diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-09-01 21:12:27 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-09-01 21:12:27 +0000 |
commit | 348738751c50c7d3c4c9ed22801a0c2cb917b790 (patch) | |
tree | ecb4987e822ee418fc4a9651a7333cbf8cf6cdfa /polyp/main.c | |
parent | ee91cb6c9ded44d7f3ddb23b681df49fe5c8146b (diff) |
daemon auto spawn
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@173 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/main.c')
-rw-r--r-- | polyp/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/polyp/main.c b/polyp/main.c index e41a106f..87265da6 100644 --- a/polyp/main.c +++ b/polyp/main.c @@ -141,12 +141,15 @@ int main(int argc, char *argv[]) { setsid(); setpgrp(); + + close(0); + close(1); } r = lt_dlinit(); assert(r == 0); -#ifdef PA_DLSEARCHDIR - lt_dladdsearchdir(PA_DLSEARCHDIR); +#ifdef DLSEARCHDIR + lt_dladdsearchdir(DLSEARCHDIR); #endif mainloop = pa_mainloop_new(); @@ -155,6 +158,7 @@ int main(int argc, char *argv[]) { r = pa_signal_init(pa_mainloop_get_api(mainloop)); assert(r == 0); pa_signal_new(SIGINT, exit_signal_callback, NULL); + pa_signal_new(SIGTERM, exit_signal_callback, NULL); signal(SIGPIPE, SIG_IGN); c = pa_core_new(pa_mainloop_get_api(mainloop)); |