diff options
author | Pierre Ossman <ossman@cendio.se> | 2006-01-05 21:49:22 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2006-01-05 21:49:22 +0000 |
commit | 2cf165db8bbcf43d9be3404f9566d523c8d6e323 (patch) | |
tree | 805c8c6e860f7a539b9d9df8c547486a2adc9bbf | |
parent | 08bbfd2169ff81e37f0e5bd911490fc07b8f05f9 (diff) |
ifdef-protect setpgid and setsid.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@406 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | polyp/main.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 5f8da071..1899e92c 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 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); |