Konstantin Belousov 8638fe7bea Thread waiting for the vfork(2)-ed child to exec or exit, must allow
for the suspension.

Currently, the loop performs uninterruptible cv_wait(9) call, which
prevents suspension until child allows further execution of parent.
If child is stopped, suspension or single-threading is delayed
indefinitely.

Create a helper thread_suspend_check_needed() to identify the need for
a call to thread_suspend_check().  It is required since call to the
thread_suspend_check() cannot be safely done while owning the child
(p2) process lock.  Only when suspension is needed, drop p2 lock and
call thread_suspend_check().  Perform wait for cv with timeout, in
case suspend is requested after wait started; I do not see a better
way to interrupt the wait.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-12-08 16:18:05 +00:00
..
2014-11-13 05:28:06 +00:00
2014-10-28 04:59:33 +00:00
2014-03-14 06:29:43 +00:00
2014-06-26 13:57:44 +00:00
2014-05-01 22:28:14 +00:00
2014-08-11 15:06:07 +00:00
2014-11-30 19:32:00 +00:00
2014-11-28 09:32:07 +00:00
2014-11-13 05:28:06 +00:00
2014-11-13 05:26:14 +00:00
2014-11-13 05:28:06 +00:00
2014-10-15 12:38:26 +00:00
2014-10-09 02:30:38 +00:00
2014-11-30 12:52:33 +00:00
2014-11-30 13:40:58 +00:00
2014-11-23 12:01:52 +00:00
2014-11-23 12:01:52 +00:00