mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 13:46:21 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user