summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-11-05 16:22:31 +0100
committerJohn Crispin <blogic@openwrt.org>2014-11-05 16:23:20 +0100
commitb899234bd657fa1ae1c71315326c3fe2cd9b6cec (patch)
treedacc69f1315cdff2a7b2c5104733472f2aa6c612
parent9286d16672b26c9fe7cb9dbf827a43a910df5559 (diff)
downloadunitd-b899234bd657fa1ae1c71315326c3fe2cd9b6cec.tar
unitd-b899234bd657fa1ae1c71315326c3fe2cd9b6cec.zip
call setsid during startup.
this fixes a bug where pgrp was not set up properly leading to a trail of carnage; Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r--procd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/procd.c b/procd.c
index 8dcd924..7528e60 100644
--- a/procd.c
+++ b/procd.c
@@ -62,6 +62,7 @@ int main(int argc, char **argv)
return usage(argv[0]);
}
}
+ setsid();
uloop_init();
procd_signal();
trigger_init();