Provided by: alliance_5.1.1-1.1build1_amd64
mbkwaitpid - wait for the end of a particular child process.
#include "mut.h" int mbkwaitpid( pid, mode, status ) int pid; int mode; int ∗status;
pid Process number to wait. mode If mode is set to 1, this function return only when the child process is terminated. Otherwise, function return immediatly. status If not NULL, the exit status of terminated child process.
mbkwaitpid provides a centralized way to catch terminated child process. Because some Alliance library can create a child process, and user application can do so, there must be a centralized way to get the exit status of process. The programmer should never modify the handler for SIGCHLD.
mbkwaitpid return 1 if child process is terminated, and 0 if isn't (case mode != 1 ).