Use _exit when daemonizing the process

The original process should use _exit if the forking of the child process
is successful. This makes sure that the exit handlers are called only when
the daemon process exits.
This commit is contained in:
Markus Mäkelä 2017-09-01 13:54:15 +03:00
parent ff94a39038
commit d931787e2e

View File

@ -1704,7 +1704,7 @@ int main(int argc, char **argv)
exit(MAXSCALE_INTERNALERROR);
}
exit(child_status);
_exit(child_status);
}
/** This is the child process and we can close the read end of