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:
parent
ff94a39038
commit
d931787e2e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user