DragonFly commits List (threaded) for 2005-12
cvs commit: src/usr.sbin/vipw pw_util.c
dillon 2005/12/26 12:18:56 PST
DragonFly src repository
A ^Z signals the whole process group, causing the parent process (vipw) to
return a stopped status for the child AND to go to sleep at the same time.
Originally the parent (vipw) stopped before it checked the child state, and
thus would not 'notice' the child going into a stopped state because the
parent would get interrupted by the SIGCONT, execute the wakeup of the
child (vi), then restart the wait*().
But now due to the fact that the process no longer enters a STOPPED
state until it actually tries to return to userland, the wait*() call will
in fact try to return the child's 'old' stopped state when both processes
are stopped with TSTP, then return it when the parent process is woken up
by the SIGCONT.
For now solve the problem by not trying to check the stopped status of
Reported-by: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Revision Changes Path
1.5 +4 -3 src/usr.sbin/vipw/pw_util.c