]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
wait: Do not copyout uninitialized status/rusage/wrusage.
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 11 Oct 2016 18:51:03 +0000 (18:51 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 11 Oct 2016 18:51:03 +0000 (18:51 +0000)
commit7d27667547950659878ca26acb09361461af3cc9
tree94481d3ae1b8715eae8a325b99a2380fbf25aaae
parentdf3752869deed63729868ea7bb006405431351f7
wait: Do not copyout uninitialized status/rusage/wrusage.

If wait4() or wait6() return 0 because of WNOHANG, the status, rusage and
wrusage information should not be returned.

PR: 212048
Reported by: Casey Lucas

git-svn-id: svn://svn.freebsd.org/base/stable/10@307065 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_exit.c
tests/sys/kern/Makefile
tests/sys/kern/waitpid_nohang.c [new file with mode: 0644]