summaryrefslogtreecommitdiffstats
path: root/src/daemon/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-07-23 15:18:06 +0200
committerLennart Poettering <lennart@poettering.net>2009-07-23 15:18:06 +0200
commit88d5749f6ae8d391963a12a6221f006de2947e50 (patch)
treef1de05b054b1ee8b272804a03b621a1dde1d8416 /src/daemon/main.c
parent0225ef68f2876bebd14977882db313fd7f3f6d64 (diff)
parent3d6278bc31aa7053f1228b3d874ba36f50a8c2d5 (diff)
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
Conflicts: src/daemon/main.c
Diffstat (limited to 'src/daemon/main.c')
-rw-r--r--src/daemon/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 07439675..b209c514 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -65,6 +65,10 @@
#include <dbus/dbus.h>
#endif
+#ifdef __linux__
+#include <sys/personality.h>
+#endif
+
#include <pulse/mainloop.h>
#include <pulse/mainloop-signal.h>
#include <pulse/timeval.h>
@@ -441,6 +445,12 @@ int main(int argc, char *argv[]) {
/* We might be autospawned, in which case have no idea in which
* context we have been started. Let's cleanup our execution
* 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_close_all(passed_fd, -1);
pa_reset_sigs(-1);