]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit - sys/kern/kern_sig.c
MFC r258281: Fix siginfo_t.si_status for wait6/waitid/SIGCHLD.
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 1 Jan 2014 20:22:29 +0000 (20:22 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 1 Jan 2014 20:22:29 +0000 (20:22 +0000)
commit1a748065ddb6aea93c40334ee15d277e2b703343
tree444e613ddde85e05d25deb24f27b98693ebbb2ba
parent814dd6d59b86c032722484a1a51d2d438cf4e36c
MFC r258281: Fix siginfo_t.si_status for wait6/waitid/SIGCHLD.

Per POSIX, si_status should contain the value passed to exit() for
si_code==CLD_EXITED and the signal number for other si_code. This was
incorrect for CLD_EXITED and CLD_DUMPED.

This is still not fully POSIX-compliant (Austin group issue #594 says that
the full value passed to exit() shall be returned via si_status, not just
the low 8 bits) but is sufficient for a si_status-related test in libnih
(upstart, Debian/kFreeBSD).

PR: kern/184002

git-svn-id: svn://svn.freebsd.org/base/stable/10@260164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_exit.c
sys/kern/kern_sig.c