From 98ce8ec7f753731ebdf4b6941daee51161d6b684 Mon Sep 17 00:00:00 2001 From: asandikci Date: Wed, 26 Jul 2023 11:39:37 +0300 Subject: [PATCH] fix: exit with succes when pid positive --- c-daemon/daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-daemon/daemon.c b/c-daemon/daemon.c index 5ad9558..db509ab 100644 --- a/c-daemon/daemon.c +++ b/c-daemon/daemon.c @@ -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;