fork timing hole ???...
Paul Campbell
pc at unisoft.UUCP
Thu Aug 15 10:15:58 AEST 1985
<oog>
The Scenario
------------
You type
"ls<ret><del>"
Where <del> is the interrupt key of choice and the space between <ret> and <del>
is very fast (try two fingers poised for action).
What happens? 1 of 3 things
1)
$ ls
$
2)
$ ls
$
3)
$ ls
my
local
files
$
BTW this has been repeated on several System 5/5.2 boxes as well as
4.1on a Vax (4.2 is not available here). It would probably be hard
to reproduce on a Cray ... unless you have REALLY fast fingers.
In 1) ls (or its shell prior to execing) was forked and then received the
signal and died. In 2) the parent shell received the signal prior to calling
fork(). In 3) the signal arrives between when the parent shell enters fork()
and the new process is created (specifically before its process group is
filled in in its proc entry).
The main reason for this is that newproc() doesn't copy pending signals from
the parents proc entry to the child.
Finally, my question ..... Is this a bug??
And the next, as yet unanswered question .... Should children inherit pending
signals?? .... Will it do any harm??
Paul Campbell
..!ucbvax!unisoft!paul
More information about the Comp.unix.wizards
mailing list