mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
daemon: reset personality, to make the autospawn env cleaup complete
This commit is contained in:
parent
7e2afffb81
commit
2f54b5df18
1 changed files with 10 additions and 0 deletions
|
|
@ -65,6 +65,10 @@
|
||||||
#include <dbus/dbus.h>
|
#include <dbus/dbus.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <sys/personality.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <pulse/mainloop.h>
|
#include <pulse/mainloop.h>
|
||||||
#include <pulse/mainloop-signal.h>
|
#include <pulse/mainloop-signal.h>
|
||||||
#include <pulse/timeval.h>
|
#include <pulse/timeval.h>
|
||||||
|
|
@ -433,6 +437,12 @@ int main(int argc, char *argv[]) {
|
||||||
/* We might be autospawned, in which case have no idea in which
|
/* We might be autospawned, in which case have no idea in which
|
||||||
* context we have been started. Let's cleanup our execution
|
* context we have been started. Let's cleanup our execution
|
||||||
* context as good as possible */
|
* context as good as possible */
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
if (personality(PER_LINUX) < 0)
|
||||||
|
pa_log_warn("Uh, personality() failed: %s", pa_cstrerror(errno));
|
||||||
|
#endif
|
||||||
|
|
||||||
pa_drop_root();
|
pa_drop_root();
|
||||||
pa_close_all(passed_fd, -1);
|
pa_close_all(passed_fd, -1);
|
||||||
pa_reset_sigs(-1);
|
pa_reset_sigs(-1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue