fix: exit with succes when pid positive
This commit is contained in:
parent
5a6e145e15
commit
98ce8ec7f7
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ int _daemon(int nochdir, int noclose){
|
||||||
exit(EXIT_FAILURE); // exit and EXIT_FAILURE defined in stdlib.h
|
exit(EXIT_FAILURE); // exit and EXIT_FAILURE defined in stdlib.h
|
||||||
}
|
}
|
||||||
else if (pid > 0){
|
else if (pid > 0){
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
if (setsid() == -1){
|
if (setsid() == -1){
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue