Question about a process lifecycle

Hello... And thx for any help anyone can offer me about my question!

I've managed to confuse myself about the wait() & exit () system calls in a process lifecycle. My confusion about the wait() system call is... does the parent process issue it to the kernel? Or does the kernel issue it to the parent process? And is the exit() system call issue from the child process to the parent process? Or does the child process issue the exit() to the kernel?

I tried googling and watching youtube videos for the answer... But I never saw anything specific to this. Once again Thanks for any replies!

A process calls the wait() function and kernel level code checks the status of a child process, it will suspend execution of the calling thread until status information for one of the terminated child processes is is available.

A call to the exit() function causes a normal termination of the process that calls exit(). There is no involvement with the parent process, in fact the parent process may have already terminated at this stage.

Note that a running process can also be terminated by sending it a signal (like SIGTERM or SIGKILL ).

1 Like