main: Make process PR_SET_DUMPABLE

Otherwise we won't get core dumps if the launching binary has
capabilities set.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/811
This commit is contained in:
Jonas Ådahl
2019-09-27 10:15:48 +02:00
committed by Carlos Garnacho
parent 8fd55fef85
commit dbe9daeb76
3 changed files with 15 additions and 0 deletions

View File

@ -70,6 +70,10 @@
#include <systemd/sd-login.h>
#endif /* HAVE_WAYLAND && HAVE_NATIVE_BACKEND */
#ifdef HAVE_SYS_PRCTL
#include <sys/prctl.h>
#endif
#include "backends/meta-backend-private.h"
#include "backends/x11/cm/meta-backend-x11-cm.h"
#include "backends/x11/meta-backend-x11.h"
@ -532,6 +536,10 @@ meta_init (void)
MetaCompositorType compositor_type;
GType backend_gtype;
#ifdef HAVE_SYS_PRCTL
prctl (PR_SET_DUMPABLE, 1);
#endif
sigemptyset (&empty_mask);
act.sa_handler = SIG_IGN;
act.sa_mask = empty_mask;