When shell_exec has been disabled through the "disable_functions" php-setting, the run-method silently fails and sets pid = 0.
This happens as you cast to integer on the following line:
https://github.com/cocur/background-process/blob/master/src/BackgroundProcess.php#L74
shell_exec returns null when an error occurs - (int) null === 0.
A RuntimeException should be thrown if shell_exec returns null.
When shell_exec has been disabled through the "disable_functions" php-setting, the run-method silently fails and sets
pid = 0.This happens as you cast to
integeron the following line:https://github.com/cocur/background-process/blob/master/src/BackgroundProcess.php#L74
shell_execreturnsnullwhen an error occurs -(int) null === 0.A RuntimeException should be thrown if shell_exec returns
null.