Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HBSD: pull in upstream fix for pwait hang when watching its own pid
From the FreeBSD Bug 218598: pwait will deadlock when passed its own PID. I experienced this when kern.randompid was set with poudriere. The code was more or less this: #!/bin/sh do_the_thing& pwait $! do_the_other_thing If do_the_thing ends before pwait starts, and do_the_thing and pwait get the same pid, pwait waits indefinitely. FreeBSD-PR: 218598 FreeBSD-PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218598 MFC-to: 10-STABLE MFC-to: 11-STABLE X-MFC-with: baf6bf5b16681f98941f25302074ff64df89e076 Submitted-by: Dan McGregor <[email protected]> Signed-off-by: Oliver Pinter <[email protected]> (cherry picked from commit e0b45ab3bc9443689c2d95ce2e3b552a027f5494) Signed-off-by: Oliver Pinter <[email protected]> (cherry picked from commit 81c3c9c) Signed-off-by: Oliver Pinter <[email protected]>
- Loading branch information