summaryrefslogtreecommitdiffstats
path: root/polyp/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/main.c')
-rw-r--r--polyp/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/polyp/main.c b/polyp/main.c
index 2e97e5cc..a56d2f1e 100644
--- a/polyp/main.c
+++ b/polyp/main.c
@@ -258,8 +258,12 @@ int main(int argc, char *argv[]) {
if (conf->auto_log_target)
pa_log_set_target(PA_LOG_SYSLOG, NULL);
+#ifdef HAVE_SETSID
setsid();
+#endif
+#ifdef HAVE_SETPGID
setpgid(0,0);
+#endif
close(0);
close(1);