call pcntl_signal_dispatch in consume to make the script able to handle posix signals.