summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_pageout.c
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2010-04-06 05:20:46 +0000
committerdougb <dougb@FreeBSD.org>2010-04-06 05:20:46 +0000
commite9fbee49d7ea41f69a621391939d5d7b8b13f82e (patch)
tree171cae2e526f97b3669f6e6f8dda9975616870be /sys/vm/vm_pageout.c
parent6edfadb92d49ec7231a5dbef34cacfe3da1295d5 (diff)
downloadFreeBSD-src-e9fbee49d7ea41f69a621391939d5d7b8b13f82e.zip
FreeBSD-src-e9fbee49d7ea41f69a621391939d5d7b8b13f82e.tar.gz
In wait_for_pids(), pwait(1) can return when the process exits, but
still exists as a zombie. The 'kill -0' test in this function can therefore return true even if the process isn't actually running. This could lead to wait_for_pids() printing an endless string of the pid number until the zombie finally exits. Solve this problem by moving the sleep up to after the 'kill -0' test, but only after we've run through the function once already. In the common case (only one pid in the list) this will always do the right thing. On the rare occasion that there is more than one pid in the list this will sleep 1 second per zombie process which will allow that process, and any other in the list a chance to exit. While I'm here, local'ize the variables that this function uses.
Diffstat (limited to 'sys/vm/vm_pageout.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud