pthreadpool: Fix fork behaviour