Functions | |
int | selfpipe_init (void) |
void | selfpipe_close (void) |
void | selfpipe_catch_signal (int) |
|
Catch a signal and write it to the self-pipe. This routine can be used with sig_*_catch() to send other signals through the self-pipe. |
|
Shut down the self-pipe.
|
|
Set up a self-pipe for catching child exit events. This function opens up a pipe within the program used to safely handle exiting child processes. Every time a child exits, a single byte is written to the pipe. The resulting file descriptor is statically assigned, so do not call this function more than once within a single program. The file descriptor is set to non-blocking mode to prevent blocking when reading from it.
To use the file descriptor, use either
|