tor  master
Typedefs | Functions
util_process.h File Reference

Headers for util_process.c. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct waitpid_callback_t waitpid_callback_t
 

Functions

waitpid_callback_tset_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)
 

Detailed Description

Headers for util_process.c.

Typedef Documentation

◆ 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.

Function Documentation

◆ clear_waitpid_callback()

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.

◆ notify_pending_waitpid_callbacks()

void notify_pending_waitpid_callbacks ( void  )

Use waitpid() to wait for all children that have exited, and invoke any callbacks registered for them.