]> rtime.felk.cvut.cz Git - sojka/libev.git/commitdiff
*** empty log message ***
authorMarc Alexander Lehmann <libev@schmorp.de>
Sun, 28 Apr 2013 12:45:20 +0000 (12:45 +0000)
committerMarc Alexander Lehmann <libev@schmorp.de>
Sun, 28 Apr 2013 12:45:20 +0000 (12:45 +0000)
Changes
ev.c

diff --git a/Changes b/Changes
index 00a03f135c82fa4459b7aeeb6709b08ff123e41d..eb2465a5c69dfd3e21482ed3950ca63852f1a41b 100644 (file)
--- a/Changes
+++ b/Changes
@@ -13,6 +13,8 @@ TODO: store loop pid_t and compare isndie signal handler,store 1 for same, 2 for
 TODO: embed watchers need updating when fd changes
 TODO: document portbaility requirements for atomic pointer access
 
+       - mark event pipe fd as cloexec after a fork (analyzed by Sami Farin).
+
 4.15 Fri Mar  1 12:04:50 CET 2013
         - destroying a non-default loop would stop the global waitpid
           watcher (Denis Bilenko).
diff --git a/ev.c b/ev.c
index e5bd5abd9e86d5ef084d14986d04af674af65fa7..2fef11c2bc8cdc0e4ac064dd2b639e42cc6e7432 100644 (file)
--- a/ev.c
+++ b/ev.c
@@ -2106,8 +2106,6 @@ evpipe_init (EV_P)
           fd_intern (fds [0]);
         }
 
-      fd_intern (fds [1]);
-
       evpipe [0] = fds [0];
 
       if (evpipe [1] < 0)
@@ -2123,6 +2121,8 @@ evpipe_init (EV_P)
           close (fds [1]);
         }
 
+      fd_intern (evpipe [1]);
+
       ev_io_set (&pipe_w, evpipe [0] < 0 ? evpipe [1] : evpipe [0], EV_READ);
       ev_io_start (EV_A_ &pipe_w);
       ev_unref (EV_A); /* watcher should not keep loop alive */