From 8c306b3e3c0fdaf41b2c87c1516fcf336d815511 Mon Sep 17 00:00:00 2001 From: lkn Date: Tue, 23 Jun 2026 13:34:07 +0200 Subject: [PATCH] ignore SIGPIPE to prevent crash on DnD/clipboard pipe close Wayland data transfers (drag-and-drop, clipboard) use pipes between clients. If a client disconnects mid-transfer, writing to the pipe raises SIGPIPE which kills the compositor. Ignore it. --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index 64665ea..3b8c2e0 100644 --- a/src/main.c +++ b/src/main.c @@ -638,6 +638,10 @@ static int real_main(int argc, char **argv) sigemptyset(&ss); sigaddset(&ss, SIGUSR2); pthread_sigmask(SIG_BLOCK, &ss, NULL); + + /* Ignore SIGPIPE — Wayland data transfers (DnD, clipboard) + * can trigger broken pipes when clients disconnect. */ + signal(SIGPIPE, SIG_IGN); } setlocale(LC_ALL, "");