mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
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:
parent
8fd55fef85
commit
dbe9daeb76
@ -61,6 +61,9 @@
|
||||
/* XKB base prefix */
|
||||
#mesondefine XKB_BASE
|
||||
|
||||
/* Whether <sys/prctl.h> exists and it defines prctl() */
|
||||
#mesondefine HAVE_SYS_PRCTL
|
||||
|
||||
/* Either <sys/random.h> or <linux/random.h> */
|
||||
#mesondefine HAVE_SYS_RANDOM
|
||||
#mesondefine HAVE_LINUX_RANDOM
|
||||
|
@ -366,6 +366,10 @@ cdata.set('HAVE_PROFILER', have_profiler)
|
||||
xkb_base = xkeyboard_config_dep.get_pkgconfig_variable('xkb_base')
|
||||
cdata.set_quoted('XKB_BASE', xkb_base)
|
||||
|
||||
if cc.has_header_symbol('sys/prctl.h', 'prctl')
|
||||
cdata.set('HAVE_SYS_PRCTL', 1)
|
||||
endif
|
||||
|
||||
if have_wayland
|
||||
xwayland_path = get_option('xwayland_path')
|
||||
if xwayland_path == ''
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user