mirror of https://gerrit.osmocom.org/libosmocore
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
This commit is contained in:
parent
4cb0c8b45e
commit
49daf56319
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue