Lock thread_pool.wait_mutex before forking to avoid a race condition between rad_fork...
authorJames Rouzier <jrouzier@inverse.ca>
Tue, 28 Oct 2014 21:13:43 +0000 (17:13 -0400)
committerJames Rouzier <jrouzier@inverse.ca>
Tue, 28 Oct 2014 21:13:43 +0000 (17:13 -0400)
commitd9d1f1cffbc9ae3caed379c44130adf05dd654a8
tree557c605521ac877733acd45e77a4ca5336867eeb
parent3e49fc120165229fe52bcfc193424c83e3460dae
Lock thread_pool.wait_mutex before forking to avoid a race condition between rad_fork, rad_waitpid and reap_children.

There is a race condition that can occur under high load where a child is reaped before being added to the waiters list.
src/main/threads.c