diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-09-11 23:12:24 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-09-11 23:12:24 +0000 |
commit | 54506ab44a9ac61e79b3a5c632db56bde41beded (patch) | |
tree | 2066264d7bdd45aa2495c0e3db04ddfb0d65b8bd /src/daemon/main.c | |
parent | d5bedbcd98c10ef187f1daa326b32c6f3ba8d3af (diff) |
on systems where we know that POSIX shm is mapped to /dev/shm, add the ability to cleanup stale SHM segments. (Right now only Linux)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1810 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/daemon/main.c')
-rw-r--r-- | src/daemon/main.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/daemon/main.c b/src/daemon/main.c index 87f3f01d..4509e7f9 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -58,13 +58,12 @@ #include <tcpd.h> #endif -#include "../pulsecore/winsock.h" - #include <pulse/mainloop.h> #include <pulse/mainloop-signal.h> #include <pulse/timeval.h> #include <pulse/xmalloc.h> +#include <pulsecore/winsock.h> #include <pulsecore/core-error.h> #include <pulsecore/core.h> #include <pulsecore/memblock.h> @@ -83,6 +82,7 @@ #include <pulsecore/mutex.h> #include <pulsecore/thread.h> #include <pulsecore/once.h> +#include <pulsecore/shm.h> #include "cmdline.h" #include "cpulimit.h" @@ -496,6 +496,13 @@ int main(int argc, char *argv[]) { goto finish; + case PA_CMD_CLEANUP_SHM: + + if (pa_shm_cleanup() >= 0) + retval = 0; + + goto finish; + default: pa_assert(conf->cmd == PA_CMD_DAEMON); } |