diff --git a/configure.ac b/configure.ac index 5f8da071b..1899e92cf 100644 --- a/configure.ac +++ b/configure.ac @@ -168,7 +168,7 @@ AC_FUNC_FORK AC_FUNC_GETGROUPS AC_FUNC_SELECT_ARGTYPES AC_CHECK_FUNCS([getaddrinfo getgrgid_r getpwuid_r gettimeofday getuid \ - inet_ntop nanosleep sigaction sleep]) + inet_ntop nanosleep setpgid setsid sigaction sleep]) AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0]) AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1") diff --git a/polyp/main.c b/polyp/main.c index 2e97e5ccf..a56d2f1e1 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);