tor
master
|
Headers for util_process.c. More...
Go to the source code of this file.
Typedefs | |
typedef struct waitpid_callback_t | waitpid_callback_t |
Functions | |
waitpid_callback_t * | set_waitpid_callback (pid_t pid, void(*fn)(int, void *), void *arg) |
void | clear_waitpid_callback (waitpid_callback_t *ent) |
void | notify_pending_waitpid_callbacks (void) |
Headers for util_process.c.
typedef struct waitpid_callback_t waitpid_callback_t |
A callback structure waiting for us to get a SIGCHLD informing us that a PID has been closed. Created by set_waitpid_callback. Cancelled or cleaned- up from clear_waitpid_callback(). Do not access outside of the main thread; do not access from inside a signal handler.
void clear_waitpid_callback | ( | waitpid_callback_t * | ent | ) |
Cancel a waitpid_callback_t, or clean up after one has triggered. Releases all storage held by ent.
void notify_pending_waitpid_callbacks | ( | void | ) |
Use waitpid() to wait for all children that have exited, and invoke any callbacks registered for them.