A parent process can wait for the completion of its child process before it, the
ID: 3752236 • Letter: A
Question
A parent process can wait for the completion of its child process before it, the parent, continues. An example is a command line interpreter that makes a child process to run the command a user typed in, waiting for it to finish. It receives a SIGCHILD sent from the child process when the child is done. But a parent process has the option of not waiting for its child process to end before continuing. In that case, does it still get SIGCHILD from the child process? What would that mean to the parent in that case?
Explanation / Answer
Answer :
Generally when a child process get terminated then SIGCHILD sent to the parent process while the default reply for this signal is to ignore it . If the process ignore this signal then it means it has called wait immediately.
This incident helps in the zombie process to finish as quickly as possible.
Actually in unix signals are not queued generally . So suppose if child process exit while the parent is not running then also it not much probable that parent gonna receive 3 SIGCHILD signals . In such scenario the will loop the more child processes.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.