summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2005-11-09 07:58:16 +0000
committerdavidxu <davidxu@FreeBSD.org>2005-11-09 07:58:16 +0000
commitf9da852761f4d4f96009496cf662d42d998c42a6 (patch)
tree85e5f8b0ce02fddd84153997caa42d74d750ee86 /sys/kern
parenta528ef30b2f1868c6b5fe3d8c3ce6caf9d618ca2 (diff)
downloadFreeBSD-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/kern')
-rw-r--r--sys/kern/kern_sig.c5
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);
}
OpenPOWER on IntegriCloud