Switch to using the thread factory to handle pcntl library not being available