aboutsummaryrefslogtreecommitdiff
path: root/xwayland/server.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-12-02 11:46:12 +0100
committerSimon Ser <contact@emersion.fr>2020-12-02 11:49:57 +0100
commit50b5f8558eb1a6b1fb7bc9dc3fbba4f7fb109bc2 (patch)
tree138bfd59c85a3de27b36c6d78756b67c09324357 /xwayland/server.c
parent8bc5a92a98ca5b788cd4f426ad2605da265ef422 (diff)
xwayland: add -core to flags
Xwayland has its own special handling for signals like SIGSEGV/SIGABRT. Instead of leaving the job to the OS, it tries to walk up the call stack (badly, because a lot of information is missing), print the stack trace to stdout, then exit(1). This is very annoying because it prevents Xwayland crashes from being easily debugged. Xwayland has a flag "-core" that aborts instead of exiting. This allows the OS to generate a coredump. It's far from perfect but better than nothing, I guess.
Diffstat (limited to 'xwayland/server.c')
-rw-r--r--xwayland/server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xwayland/server.c b/xwayland/server.c
index d0057c66..e022f871 100644
--- a/xwayland/server.c
+++ b/xwayland/server.c
@@ -61,7 +61,7 @@ noreturn static void exec_xwayland(struct wlr_xwayland_server *server) {
char *argv[] = {
"Xwayland", NULL /* display, e.g. :1 */,
- "-rootless", "-terminate",
+ "-rootless", "-terminate", "-core",
"-listen", NULL /* x_fd[0] */,
"-listen", NULL /* x_fd[1] */,
"-wm", NULL /* wm_fd[1] */,
@@ -89,7 +89,7 @@ noreturn static void exec_xwayland(struct wlr_xwayland_server *server) {
snprintf(wayland_socket_str, sizeof(wayland_socket_str), "%d", server->wl_fd[1]);
setenv("WAYLAND_SOCKET", wayland_socket_str, true);
- wlr_log(WLR_INFO, "WAYLAND_SOCKET=%d Xwayland :%d -rootless -terminate -listen %d -listen %d -wm %d",
+ wlr_log(WLR_INFO, "WAYLAND_SOCKET=%d Xwayland :%d -rootless -terminate -core -listen %d -listen %d -wm %d",
server->wl_fd[1], server->display, server->x_fd[0],
server->x_fd[1], server->wm_fd[1]);