summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun <engineerarun@gmail.com>2024-11-05 06:30:54 +0530
committerGitHub <noreply@github.com>2024-11-05 06:30:54 +0530
commitf762b3dc0c40d854e7e1a7449155816bc19bed17 (patch)
tree1f06a336b1c5760a043a5857c8da7ef36d980049
parent877d7c06876287930e03e232dd0b0167cadd9abd (diff)
parentb67c7d71e682c7cb2320c5a1282bffdca6d47d82 (diff)
Merge pull request #1948 from babbaj/fix-sigpipe
restore sigpipe handler in plugin child processes
-rw-r--r--src/nnn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 10feca38..ec26c0df 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] = "-";