… | |
… | |
85 | kqueue_changecnt = 0; |
85 | kqueue_changecnt = 0; |
86 | |
86 | |
87 | if (res < 0) |
87 | if (res < 0) |
88 | { |
88 | { |
89 | if (errno != EINTR) |
89 | if (errno != EINTR) |
90 | syserr (); |
90 | syserr ("(libev) kevent"); |
91 | |
91 | |
92 | return; |
92 | return; |
93 | } |
93 | } |
94 | |
94 | |
95 | for (i = 0; i < res; ++i) |
95 | for (i = 0; i < res; ++i) |
… | |
… | |
183 | } |
183 | } |
184 | |
184 | |
185 | static void |
185 | static void |
186 | kqueue_fork (EV_P) |
186 | kqueue_fork (EV_P) |
187 | { |
187 | { |
|
|
188 | for (;;) |
|
|
189 | { |
188 | kqueue_fd = kqueue (); |
190 | kqueue_fd = kqueue (); |
|
|
191 | |
|
|
192 | if (kqueue_fd >= 0) |
|
|
193 | break; |
|
|
194 | |
|
|
195 | syserr ("(libev) kqueue"); |
|
|
196 | } |
|
|
197 | |
189 | fcntl (kqueue_fd, F_SETFD, FD_CLOEXEC); |
198 | fcntl (kqueue_fd, F_SETFD, FD_CLOEXEC); |
190 | |
199 | |
191 | /* re-register interest in fds */ |
200 | /* re-register interest in fds */ |
192 | fd_rearm_all (EV_A); |
201 | fd_rearm_all (EV_A); |
193 | } |
202 | } |