Daemon-Control icon indicating copy to clipboard operation
Daemon-Control copied to clipboard

Correct check for failed forks

Open eserte opened this issue 11 years ago • 0 comments

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().

eserte avatar Aug 21 '14 16:08 eserte