summaryrefslogtreecommitdiffstats
path: root/src/application.c
diff options
context:
space:
mode:
authorThorsten Alteholz <osmocom@alteholz.de>2017-03-13 01:18:49 +0100
committerHarald Welte <laforge@gnumonks.org>2017-03-15 13:08:13 +0000
commit49daf56319d7b42919aaf02191be80fd1ca31ca0 (patch)
tree8114bc49c92c98a98c684befbede2482d427e98b /src/application.c
parent4cb0c8b45e0b4022adc63155ff44d9967d8f79d4 (diff)
fix wrong return code
In case we are a daemon, we do not need to daemonize again. On the other hand everything is fine and we also do not need to bail out with an error. The daemonize template at [1] does the same. [1] http://www.itp.uzh.ch/~dpotter/howto/daemonize Change-Id: Ia4dcf7344bd65934faa3d7d46563f6e0532c232e
Diffstat (limited to 'src/application.c')
-rw-r--r--src/application.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/application.c b/src/application.c
index 8a325c8a..4112e75c 100644
--- a/src/application.c
+++ b/src/application.c
@@ -124,7 +124,7 @@ int osmo_daemonize(void)
/* Check if parent PID == init, in which case we are already a daemon */
if (getppid() == 1)
- return -EEXIST;
+ return 0;
/* Fork from the parent process */
pid = fork();