Catch up to r325719 which makes the kern.proc.pid sysctl "work" for zombies.
authorjhb <jhb@FreeBSD.org>
Mon, 18 Dec 2017 23:35:14 +0000 (23:35 +0000)
committerjhb <jhb@FreeBSD.org>
Mon, 18 Dec 2017 23:35:14 +0000 (23:35 +0000)
commitb1e08aa1e714d3665ac145683bc78577e2452fab
tree8791bc68cb7b19a4e7c986763f2f24d43bad0354
parent89f962e844cab86aff8f4eaac814137436b7c9d6
Catch up to r325719 which makes the kern.proc.pid sysctl "work" for zombies.

Some of the ptrace tests need to wait for a child process to become a
zombie before preceding.  The parent process polls the child process
via the kern.proc.pid sysctl to wait for it to become a zombie.
Previously the code polled until the sysctl failed with ESRCH.  Now it
will poll until either the sysctl fails with ESRCH (for compatiblity
with older kernels) or returns a kinfo_proc structure with the ki_stat
field set to SZOMB.

Reported by: Jenkins
Tested by: markj
Discussed with: mjg
MFC after: 1 week
tests/sys/kern/ptrace_test.c