From 54506ab44a9ac61e79b3a5c632db56bde41beded Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 11 Sep 2007 23:12:24 +0000 Subject: 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 --- src/daemon/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/daemon/main.c') 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 #endif -#include "../pulsecore/winsock.h" - #include #include #include #include +#include #include #include #include @@ -83,6 +82,7 @@ #include #include #include +#include #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); } -- cgit