Skip to content

Commit

Permalink
Reset SIGPIPE in child process.
Browse files Browse the repository at this point in the history
  • Loading branch information
slewsys committed Jan 10, 2025
1 parent b165c7a commit 88e1205
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ filter_lines (off_t from, off_t to, const char *sc, ed_buffer_t *ed)
/* Reset signals for shell. */
signal (SIGINT, SIG_DFL);
signal (SIGQUIT, SIG_DFL);
signal (SIGPIPE, SIG_DFL);

/*
* Redirect read/write pipes to command's standard I/O. Close
Expand Down
1 change: 1 addition & 0 deletions src/cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ system_shell (const char *sc, ed_buffer_t *ed)
/* Reset signals for shell. */
signal (SIGINT, SIG_DFL);
signal (SIGQUIT, SIG_DFL);
signal (SIGPIPE, SIG_DFL);

if (execl ("/bin/sh", "sh", "-c", sc, NULL) < 0)
{
Expand Down

0 comments on commit 88e1205

Please sign in to comment.