WIFxxx macros requires an int type but p_xstat is short, convert it
to int before using the macros. Bug reported by : Pyun YongHyeon pyunyh at gmail dot com
This commit is contained in:
parent
a528ef30b2
commit
f9da852761
@ -2894,11 +2894,12 @@ void
|
||||
childproc_exited(struct proc *p)
|
||||
{
|
||||
int reason;
|
||||
int status = p->p_xstat; /* convert to int */
|
||||
|
||||
reason = CLD_EXITED;
|
||||
if (WCOREDUMP(p->p_xstat))
|
||||
if (WCOREDUMP(status))
|
||||
reason = CLD_DUMPED;
|
||||
else if (WIFSIGNALED(p->p_xstat))
|
||||
else if (WIFSIGNALED(status))
|
||||
reason = CLD_KILLED;
|
||||
childproc_stopped(p, reason);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user