Merge pull request #1948 from babbaj/fix-sigpipe

restore sigpipe handler in plugin child processes
This commit is contained in:
Arun 2024-11-05 06:30:54 +05:30 committed by GitHub
commit f762b3dc0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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] = "-";