]> mj.ucw.cz Git - libucw.git/commitdiff
O_CLOEXEC is not always available on Linux, too
authorMartin Mares <mj@ucw.cz>
Mon, 13 Apr 2009 12:31:59 +0000 (14:31 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 13 Apr 2009 12:31:59 +0000 (14:31 +0200)
ucw/mainloop.c

index 2172e823b02e85f8d1fdf6adbb3ba63285e73a3f..d6d9c367a495af46f48f724a4b40118390789fb2 100644 (file)
@@ -35,9 +35,9 @@ static struct pollfd *main_poll_table;
 static uns main_sigchld_set_up;
 static volatile sig_atomic_t chld_received = 0;
 
-#ifdef CONFIG_LINUX
-// On Linux, O_CLOEXEC flag is available and we can get around the race
-// condition of poll().
+#ifdef O_CLOEXEC
+// On recent Linux systems, O_CLOEXEC flag is available and we can get around
+// the race condition of poll().
 #define USE_SELF_PIPE
 static int sig_pipe_recv, sig_pipe_send;
 #endif