Added an alternative for pcntl_signal_dispatch, because it does not work in PHP 5.2