mirror of https://github.com/aria2/aria2
Use _exit() instead of exit() where appropriate
parent
45a128a7e8
commit
8e3ae3b76c
|
@ -48,7 +48,7 @@ int daemon(int nochdir, int noclose)
|
||||||
if(pid == -1) {
|
if(pid == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if(pid > 0) {
|
} else if(pid > 0) {
|
||||||
exit(EXIT_SUCCESS);
|
_exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
if(setsid() == -1) {
|
if(setsid() == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -57,7 +57,7 @@ int daemon(int nochdir, int noclose)
|
||||||
if(pid == -1) {
|
if(pid == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if(pid > 0) {
|
} else if(pid > 0) {
|
||||||
exit(EXIT_SUCCESS);
|
_exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
if(nochdir == 0) {
|
if(nochdir == 0) {
|
||||||
if(chdir("/") == -1) {
|
if(chdir("/") == -1) {
|
||||||
|
|
|
@ -1715,7 +1715,7 @@ void executeHook
|
||||||
firstFilename.c_str(),
|
firstFilename.c_str(),
|
||||||
reinterpret_cast<char*>(0));
|
reinterpret_cast<char*>(0));
|
||||||
perror(("Could not execute user command: "+command).c_str());
|
perror(("Could not execute user command: "+command).c_str());
|
||||||
exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
|
|
Loading…
Reference in New Issue