Does child process die when parent dies?

Khang Lê

New member
Does child process die when parent dies?
Answer
The child process is spawned in the background. The shell waits for a newline (or an EOF) then kills the child. When the parent dies–no matter what the reason–it will close its end of the pipe. The child shell will get an EOF from the read and proceed to kill the backgrounded child process.
 

Tìm kiếm

Back
Top