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:
@ -1704,7 +1704,7 @@ int main(int argc, char **argv)
|
|||||||
exit(MAXSCALE_INTERNALERROR);
|
exit(MAXSCALE_INTERNALERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(child_status);
|
_exit(child_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This is the child process and we can close the read end of
|
/** This is the child process and we can close the read end of
|
||||||
|
Reference in New Issue
Block a user