Merge remote-tracking branch 'upstream/master' into merge/upstream-full

# Conflicts:
#	CONTRIBUTING.md
#	src/profanity.c
#	src/tools/editor.c
This commit is contained in:
2026-04-18 12:26:52 +03:00
6 changed files with 32 additions and 2 deletions

View File

@@ -17,6 +17,7 @@
#include <sys/wait.h>
#include <unistd.h>
#include <pthread.h>
#include <signal.h>
#include "config/files.h"
#include "config/preferences.h"
@@ -313,6 +314,12 @@ launch_editor(gchar* initial_content, void (*callback)(gchar* content, void* dat
return TRUE;
} else if (pid == 0) {
// Child process: Inherits TTY from parent
// Reset signal handlers that profanity sets so the editor doesn't inherit them
signal(SIGINT, SIG_DFL);
signal(SIGTSTP, SIG_DFL);
signal(SIGPIPE, SIG_DFL);
if (editor_argv && editor_argv[0]) {
execvp(editor_argv[0], editor_argv);
}