fix: exit with succes when pid positive

This commit is contained in:
Aliberk Sandıkçı 2023-07-26 11:39:37 +03:00
parent 5a6e145e15
commit 98ce8ec7f7
Signed by: asandikci
GPG key ID: 25C67A03B5666BC1

View file

@ -18,7 +18,7 @@ int _daemon(int nochdir, int noclose){
exit(EXIT_FAILURE); // exit and EXIT_FAILURE defined in stdlib.h
}
else if (pid > 0){
exit(EXIT_FAILURE);
exit(EXIT_SUCCESS);
}
if (setsid() == -1){
return -1;