The `waitpid()` function is a POSIX function designated for waiting for status changes and for obtaining the status information about the child process whose status has changed.
The waitpid()
function is a POSIX function designated for waiting for status changes and for obtaining the status information about the child process whose status has changed.
Being used together with the fork()
function, the waitpid()
function allows to take control over the child process status changes in a variety of ways.
The function behavior is very flexible and depends on parameters passed to the function arguments. However, exists another way to deal with the child process status changes ignoring them. This can be achieved by ignoring the SIGCHLD
signal, delivered by the kernel to the parent process when a child process terminates or stops.