diff options
author | root <root> | 2007-10-31 00:24:16 +0000 |
---|---|---|
committer | root <root> | 2007-10-31 00:24:16 +0000 |
commit | efb07571c1a235448b70212dc46467214da4bb92 (patch) | |
tree | 5f74ddcdc13998d65febf8c73737c5fb5f349f3f /ev_epoll.c | |
parent | 096e6ef16f52ddf1b6abcba43a9bbe29aa653735 (diff) |
signal support
Diffstat (limited to 'ev_epoll.c')
-rw-r--r-- | ev_epoll.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -23,6 +23,7 @@ void epoll_postfork_child (void) int fd; epoll_fd = epoll_create (256); + fcntl (epoll_fd, F_SETFD, FD_CLOEXEC); /* re-register interest in fds */ for (fd = 0; fd < anfdmax; ++fd) @@ -57,20 +58,20 @@ static void epoll_poll (ev_tstamp timeout) } } -int epoll_init (int flags) +void epoll_init (int flags) { epoll_fd = epoll_create (256); if (epoll_fd < 0) - return 0; + return; + + fcntl (epoll_fd, F_SETFD, FD_CLOEXEC); - ev_method = EVMETHOD_EPOLL; + ev_method = EVMETHOD_EPOLL; method_fudge = 1e-3; /* needed to compensate for epoll returning early */ method_modify = epoll_modify; method_poll = epoll_poll; eventmax = 64; /* intiial number of events receivable per poll */ events = malloc (sizeof (struct epoll_event) * eventmax); - - return 1; } |