Daemon-Control
Daemon-Control copied to clipboard
Correct check for failed forks
Swapped the checks after a fork() call, so now the check for defined() is done first, so a failed fork() is trapped correctly.
Additionally, a failed fork() now causes a die() instead of a warn() --- in this situation nothing works correctly, so the do_start() call should fail.
This change has also a new test file, which simulates a failed fork().