search for: notify_setup

Displaying 1 result from an estimated 1 matches for "notify_setup".

Did you mean: inotify_setup
2001 Oct 31
2
suggested fix for the sigchld race
...0 1.82 +++ serverloop.c 11 Oct 2001 18:06:33 -0000 @@ -92,6 +92,45 @@ /* prototypes */ static void server_init_dispatch(void); +/* + * we write to this pipe if a SIGCHLD is caught in order to avoid + * the race between select() and child_terminated + */ +static int notify_pipe[2]; +static void +notify_setup(void) +{ + if (pipe(notify_pipe) < 0) { + error("pipe(notify_pipe) failed %s", strerror(errno)); + notify_pipe[0] = -1; /* read end */ + notify_pipe[1] = -1; /* write end */ + } else { + set_nonblock(notify_pipe[0]); + set_nonblock(notify_pipe[1]); + } +} +static void +notify_pare...