fork timing hole? (nope)

Paul Campbell pc at unisoft.UUCP
Sat Aug 17 06:27:24 AEST 1985


> Explanation:  If you look closely at the sh/csh code, you'll find cases
> where sh and/or csh catch SIGINT and emit a newline.  Specifically, it's
> the parent shell which does this if it's interrupted while waiting for
> the child to terminate.  By the way, receipt of the interrupt character
> generates a SIGINT for every process in the controlling terminal's
> process group.
> 
> >	... [wild speculation]

You miss my point, cases 1 and 2 I don't care about, but the third case ....
where the parent gets the signal and the child continues without receiving
the signal is the interesting one. During a fork the parent does not pass its
pending signals to the child, if an interrupt character is received after
the shell starts the fork call (enters kernel mode) and before the system
writes the process group in the proc table entry then the new process does
not belong to the parent's process group until this moment. During this
time any signals to the parent will not be received by the child.


		Paul Campbell
		..!ucbvax!unisoft!paul



More information about the Comp.unix.wizards mailing list