From 9213272527ce737252b706aa1ed5e215f02b0607 Mon Sep 17 00:00:00 2001 From: "jabber.developer2" Date: Sun, 31 May 2026 15:12:40 +0300 Subject: [PATCH] remove SIGUSR1 escape; pkill is the standard recovery The SIGUSR1 -> editor_emergency_kill wiring was a contrived escape hatch. A console user with a stuck editor reaches for kill / pkill / SIGKILL on the editor, not undocumented signals on the chat client. editor_emergency_kill() stays for the internal Ctrl-Z abort path. --- src/command/cmd_defs.c | 3 ++- src/profanity.c | 11 ----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index 60a85eec..e3e26ddf 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -2638,7 +2638,8 @@ static const struct cmd_t command_defs[] = { CMD_DESC( "Spawn external editor to edit message. " "After editing the inputline may appear empty. Press enter to send the text anyways. " - "Use /executable to set your favourite editor." ) + "Use /executable to set your favourite editor. " + "Ctrl-Z in the editor aborts the session and returns to Profanity." ) }, { CMD_PREAMBLE("/correct-editor", diff --git a/src/profanity.c b/src/profanity.c index 2d278ba5..2d5aca43 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -20,7 +20,6 @@ #include #include -#include #include "profanity.h" #include "common.h" @@ -219,15 +218,6 @@ sigterm_handler(int sig) force_quit = TRUE; } -// SIGUSR1 escape for an alive-but-stuck editor (WUNTRACED can't catch it). -// Dispatched in the main loop. Trigger: `pkill -USR1 profanity`. -static gboolean -_emergency_resume_handler(gpointer data) -{ - editor_emergency_kill(); - return G_SOURCE_CONTINUE; -} - static void sigtstp_handler(int sig) { @@ -252,7 +242,6 @@ _init(char* log_level, char* config_file, char* log_file, char* theme_name) signal(SIGWINCH, ui_sigwinch_handler); signal(SIGTERM, sigterm_handler); signal(SIGHUP, sigterm_handler); - g_unix_signal_add(SIGUSR1, _emergency_resume_handler, NULL); if (pthread_mutex_init(&lock, NULL) != 0) { log_error("Mutex init failed"); exit(1);