pthreadpool: Fix pthreadpools with fork
commitccc187ff5e6cbc411476c5f5e68cc6bb1fe35818
authorVolker Lendecke <vl@samba.org>
Mon, 3 Mar 2014 11:20:41 +0000 (3 12:20 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 3 Mar 2014 13:29:24 +0000 (3 14:29 +0100)
tree6dfaf1e3ce9c0a3d44bd4eed9640dbb8fb4bef1f
parent925625b52886d40b50fc631bad8bdc81970f7598
pthreadpool: Fix pthreadpools with fork

The current could would crash if a pthreadpool was created, deleted and the
process then fork()s. "pthreadpools" is NULL in this case, but the
pthread_atfork handlers are in place. This fixes walking the pthreadpools list
in reverse.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Simo Sorce <simo@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/lib/pthreadpool/pthreadpool.c