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:
davidxu 2005-11-09 07:58:16 +00:00
parent a528ef30b2
commit f9da852761

View File

@ -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);
}