mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
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
This commit is contained in:
parent
d5bedbcd98
commit
54506ab44a
5 changed files with 134 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue