Use _exit() instead of exit() where appropriate

pull/46/head
Tatsuhiro Tsujikawa 2013-02-14 01:01:06 +09:00
parent 45a128a7e8
commit 8e3ae3b76c
2 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ int daemon(int nochdir, int noclose)
if(pid == -1) {
return -1;
} else if(pid > 0) {
exit(EXIT_SUCCESS);
_exit(EXIT_SUCCESS);
}
if(setsid() == -1) {
return -1;
@ -57,7 +57,7 @@ int daemon(int nochdir, int noclose)
if(pid == -1) {
return -1;
} else if(pid > 0) {
exit(EXIT_SUCCESS);
_exit(EXIT_SUCCESS);
}
if(nochdir == 0) {
if(chdir("/") == -1) {

View File

@ -1715,7 +1715,7 @@ void executeHook
firstFilename.c_str(),
reinterpret_cast<char*>(0));
perror(("Could not execute user command: "+command).c_str());
exit(EXIT_FAILURE);
_exit(EXIT_FAILURE);
}
#else
PROCESS_INFORMATION pi;