From b67c7d71e682c7cb2320c5a1282bffdca6d47d82 Mon Sep 17 00:00:00 2001 From: Babbaj Date: Mon, 4 Nov 2024 19:04:47 -0500 Subject: [PATCH] restore sigpipe handler in plugin child processes --- src/nnn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nnn.c b/src/nnn.c index 10feca38d..ec26c0df6 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -5529,6 +5529,9 @@ static bool run_plugin(char **path, const char *file, char *runfile, char **last if (wfd == -1) _exit(EXIT_FAILURE); + /* Restore sigpipe handler to default */ + sigaction(SIGPIPE, &(struct sigaction){.sa_handler = SIG_DFL}, NULL); + if (!cmd_as_plugin) { char *sel = NULL; char std[2] = "-";