Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
unix: don't close kqueue fd in kqueue_fork()
The file descriptor is not inherited by the child process. Trying to close it is
not just useless, it's actively harmful - if the close() call succeeds, it will
have closed an altogether different file descriptor.
  • Loading branch information
bnoordhuis committed Jan 19, 2012
1 parent bf8ccfc commit 98f3446
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/unix/ev/ev_kqueue.c
Expand Up @@ -200,8 +200,6 @@ kqueue_destroy (EV_P)
void inline_size
kqueue_fork (EV_P)
{
close (backend_fd);

while ((backend_fd = kqueue ()) < 0)
ev_syserr ("(libev) kqueue");

Expand Down

0 comments on commit 98f3446

Please sign in to comment.