From 48ccbdea817fb25a05eb4024844eec6ec81249a7 Mon Sep 17 00:00:00 2001 From: kib Date: Sat, 18 Jul 2015 09:02:50 +0000 Subject: The si_status field of the siginfo_t, provided by the waitid(2) and SIGCHLD signal, should keep full 32 bits of the status passed to the _exit(2). Split the combined p_xstat of the struct proc into the separate exit status p_xexit for normal process exit, and signalled termination information p_xsig. Kernel-visible macro KW_EXITCODE() reconstructs old p_xstat from p_xexit and p_xsig. p_xexit contains complete status and copied out into si_status. Requested by: Joerg Schilling Reviewed by: jilles (previous version), pho Tested by: pho Sponsored by: The FreeBSD Foundation --- sys/compat/linux/linux_fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/compat/linux/linux_fork.c') diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c index 394c26f..6b37490 100644 --- a/sys/compat/linux/linux_fork.c +++ b/sys/compat/linux/linux_fork.c @@ -398,7 +398,7 @@ linux_exit(struct thread *td, struct linux_exit_args *args) * exit via pthread_exit() try thr_exit() first. */ kern_thr_exit(td); - exit1(td, W_EXITCODE(args->rval, 0)); + exit1(td, args->rval, 0); /* NOTREACHED */ } -- cgit v1.1