fork timing hole? (nope)
Tom Truscott
trt at rti-sel.UUCP
Tue Aug 20 01:17:53 AEST 1985
> ... During a fork the parent does not pass its
> pending signals to the child, ...
It sure looks like a bug to me.
System calls should be atomic actions whenever possible,
and we should avoid funny stuff happening 'within' a syscall.
I think there are two (at least) fixes to this bug:
1) Copy the appropriate pending signals to the child
(simulating delivery *after* the fork is completed).
2) Back out of the fork, deliver the signal, then restart
(simulating delivery *before* the fork begins).
One detail in copying pending signals to the child is that
only signals delivered to the entire process group should be copied.
For example, if some process signals the parent with 'kill(parent, SIGINT)'
the child should not get it.
Tom Truscott
More information about the Comp.unix.wizards
mailing list