--- libev-4.15/ev.c.bak 2013-03-01 13:10:48.000000000 +0200 +++ libev-4.15/ev.c 2013-04-28 14:19:02.449797493 +0300 @@ -2119,7 +2119,7 @@ evpipe_init (EV_P) /* this branch does not do anything sensible on windows, */ /* so must not be executed on windows */ - dup2 (fds [1], evpipe [1]); + dup3 (fds [1], evpipe [1], O_CLOEXEC); close (fds [1]); }