Skip to content

Commit

Permalink
Merge pull request #1948 from babbaj/fix-sigpipe
Browse files Browse the repository at this point in the history
restore sigpipe handler in plugin child processes
  • Loading branch information
jarun authored Nov 5, 2024
2 parents 877d7c0 + b67c7d7 commit f762b3d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] = "-";
Expand Down

0 comments on commit f762b3d

Please sign in to comment.