system - Add wait6(), waitid(), and si_pid/si_uid siginfo support
* Add the wait6() system call (header definitions taken from FreeBSD).
This required rearranging kern_wait() a bit. In particular, we now
maintain a hold count of 1 on the process during processing instead
of releasing the hold count early.
* Add waitid() to libc (waitid.c taken from FreeBSD).
* Adjust manual pages (taken from FreeBSD).
* Add siginfo si_pid and si_uid support. This basically allows a process
taking a signal to determine where the signal came from. The fields
already existed in siginfo but were not implemented.
Implemented using a non-queued per-process array of signal numbers.
The last originator sending any given signal is recorded and passed
through to userland in the siginfo.
* Fixes the 'lightdm' X display manager. lightdm relies on si_pid
support. In addition, note that avoiding long lightdm related
latencies and timeouts require a softlink from libmozjs-52.so to
libmozjs-52.so.0 (must be addressed in dports, not addressed in this
commit).
Loosely-taken-from: FreeBSD (wait6, waitid support only)
Reviewed-by: swildner
UnifiedSplitRaw