slave: restore SIGPIPE

This commit is contained in:
Daniel Eklöf 2021-12-18 23:20:10 +01:00
parent 59b5ba03c7
commit fb488b6162
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -278,7 +278,8 @@ slave_spawn(int ptmx, int argc, const char *cwd, char *const *argv,
sigset_t mask;
sigemptyset(&mask);
if (sigprocmask(SIG_SETMASK, &mask, NULL) < 0 ||
sigaction(SIGHUP, &(struct sigaction){.sa_handler = SIG_DFL}, NULL) < 0)
sigaction(SIGHUP, &(struct sigaction){.sa_handler = SIG_DFL}, NULL) < 0 ||
sigaction(SIGPIPE, &(struct sigaction){.sa_handler = SIG_DFL}, NULL) < 0)
{
const int errno_copy = errno;
LOG_ERRNO_P(errno, "failed to restore signals");