diff options
author | ed <ed@FreeBSD.org> | 2015-07-09 12:04:45 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2015-07-09 12:04:45 +0000 |
commit | ed913b3a6c69b41f1de3947a45330fe4c6130b49 (patch) | |
tree | 2b08d2e351864d68154542afbe2045a9ad438a47 /contrib/llvm/include/llvm-c/Support.h | |
parent | 99ff382570a14b26be5e95ed8886d0936ca03502 (diff) | |
download | FreeBSD-src-ed913b3a6c69b41f1de3947a45330fe4c6130b49.zip FreeBSD-src-ed913b3a6c69b41f1de3947a45330fe4c6130b49.tar.gz |
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
Diffstat (limited to 'contrib/llvm/include/llvm-c/Support.h')
0 files changed, 0 insertions, 0 deletions