o Terminate an endless loop sh -T goes into in dowait() around waitproc().

XXX from Tor: "The shell can also go into a similar loop if the child was
killed by signal 127, since the shell would believe the child to have
only stopped (WIFSTOPPED() macro returns nonzero value).  Disallowing
signals 127 and 128 will fix that problem."  See kern/19402 for details.

PR:				bin/66242
Submitted by:			tegge
Analysis and testcase by:	demon
MFC after:			3 weeks
This commit is contained in:
Maxim Konovalov 2004-12-02 13:12:43 +00:00
parent 355be4eeda
commit 0c77b3c9c1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138312

View File

@ -926,7 +926,8 @@ dowait(int block, struct job *job)
in_dowait--;
if (breakwaitcmd != 0) {
breakwaitcmd = 0;
return -1;
if (pid <= 0)
return -1;
}
if (pid <= 0)
return pid;