Merge pull request #34 from stratiator/master

call pcntl_signal_dispatch in consume to make the script able to handle posix signals
move up call pcntl_signal_dispatch above error logging to prevent raising an error on term signal