Ed Schouten 3a41ec6af7 Don't clobber td->td_retval[0] in proc_reap().
While writing tests for CloudABI, I noticed that close() on process
descriptors returns the process ID of the child process. This is
interesting, as close() is only allowed to return 0 or -1. It turns out
that we clobber td->td_retval[0] in proc_reap(), so that wait*()
properly returns the process ID.

Change proc_reap() to leave td->td_retval[0] alone. Set the return value
in kern_wait6() instead, by keeping track of the PID before we
(potentially) reap the process.

Differential Revision:	https://reviews.freebsd.org/D3032
Reviewed by:	kib
2015-07-09 12:04:45 +00:00
..
2015-04-18 21:50:53 +00:00
2015-04-22 14:38:58 +00:00
2015-06-30 17:00:45 +00:00
2015-01-22 11:12:42 +00:00
2015-06-30 17:00:45 +00:00
2015-06-12 10:01:24 +00:00
2015-06-12 10:01:24 +00:00
2015-06-10 10:48:12 +00:00
2015-01-22 11:12:42 +00:00
2015-06-12 10:01:24 +00:00
2015-04-22 14:38:58 +00:00
2014-03-14 06:29:43 +00:00
2015-06-30 17:00:45 +00:00
2014-06-26 13:57:44 +00:00
2014-08-11 15:06:07 +00:00
2015-01-22 11:12:42 +00:00
2015-06-10 10:48:12 +00:00
2015-04-18 21:50:53 +00:00
2015-04-18 21:50:53 +00:00
2015-06-10 10:48:12 +00:00
2014-11-30 12:52:33 +00:00
2015-03-17 14:16:50 +00:00