Useful as a replacement for wait
, waitpid
and similar calls, which do not allow the caller to check for completion without permanently removing the completion notice.
Call process_pending to see if there is a recently completed process, process_wait to wait for completion with a timeout, and process_putback to put the completion back into the queue.
#include <sys/wait.h>
Go to the source code of this file.
Data Structures | |
struct | process_info |
Describes a completed process. More... | |
Functions | |
process_info * | process_wait (int timeout) |
Wait for a process to complete, and return its status. | |
int | process_pending () |
Detect if a child process has completed. | |
void | process_putback (struct process_info *p) |
Return a process_info structure to the queue. |
|
Wait for a process to complete, and return its status.
Wait for up to timeout seconds for a child process to complete. If a process has completed, its status will be returned in a process_info structure. The caller may either call
|
|
Detect if a child process has completed. If so, its status may be obtained without delay by calling process_wait .
|
|
Return a process_info structure to the queue.
|