cvs commit: src/sys/kern kern_sig.c
Simon Schubert
corecode at crater.dragonflybsd.org
Thu Feb 22 07:51:15 PST 2007
corecode 2007/02/22 07:48:55 PST
DragonFly src repository
Modified files:
sys/kern kern_sig.c
Log:
Fix stopping of the current process, which was broken by the last commit.
If the current process is still far inside the kernel and is going to
tsleep(), CURSIG()/issignal() in tsleep() have to see the pending signal;
holding the process in SSTOP is not enough.
However, if this is happening to a process which already received a stopping
signal and thus already is in SSTOP, but which wakes up for some reason, and
then posts a SA_STOP signal to itself, we may not ignore this, in spite of
already being in SSTOP.
All this process stopping business inside CURSIG()/issignal() makes all of
this very fragile, but we will have to live with it for now.
The bug can be reproduced by doing
% cat
^Z
% ps lx|grep '[c]at'
The correct output would be something like:
4156 stop p2 DL 0:00.00 cat
The broken behavior shows with:
17417 ttybg2 p2 TL 0:00.00 cat
Reviewed-by: Thomas E. Spanjaard <tgen at netphreax.net>
Revision Changes Path
1.70 +8 -2 src/sys/kern/kern_sig.c
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_sig.c.diff?r1=1.69&r2=1.70&f=u
More information about the Commits
mailing list