diff options
author | davidxu <davidxu@FreeBSD.org> | 2005-11-09 07:58:16 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2005-11-09 07:58:16 +0000 |
commit | f9da852761f4d4f96009496cf662d42d998c42a6 (patch) | |
tree | 85e5f8b0ce02fddd84153997caa42d74d750ee86 /sys | |
parent | a528ef30b2f1868c6b5fe3d8c3ce6caf9d618ca2 (diff) | |
download | FreeBSD-src-f9da852761f4d4f96009496cf662d42d998c42a6.zip FreeBSD-src-f9da852761f4d4f96009496cf662d42d998c42a6.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_sig.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 8efd21d..91712a4 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -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); } |