summaryrefslogtreecommitdiff
path: root/src/libstddjb/child_spawn1_internal.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-03-09 17:18:15 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-03-09 17:18:15 +0000
commit34673241173ebcb143df9652e67ac077ba7176c0 (patch)
tree46fadd1d151cc3fb3693c4b0793271b8171046fa /src/libstddjb/child_spawn1_internal.c
parent4dc49226555d272d4e5deea86fddaa13595f18f0 (diff)
downloadskalibs-34673241173ebcb143df9652e67ac077ba7176c0.tar.xz
- reset all signals to default in child_spawn*
- cosmetic fix in INSTALL - version: rc for 2.3.1.2
Diffstat (limited to 'src/libstddjb/child_spawn1_internal.c')
-rw-r--r--src/libstddjb/child_spawn1_internal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstddjb/child_spawn1_internal.c b/src/libstddjb/child_spawn1_internal.c
index 2ce2ac3..8347f69 100644
--- a/src/libstddjb/child_spawn1_internal.c
+++ b/src/libstddjb/child_spawn1_internal.c
@@ -28,8 +28,11 @@ pid_t child_spawn1_internal (char const *prog, char const *const *argv, char con
sigset_t set ;
sigemptyset(&set) ;
e = posix_spawnattr_setsigmask(&attr, &set) ;
+ if (e) goto errattr ;
+ sigfillset(&set) ;
+ e = posix_spawnattr_setsigdefault(&attr, &set) ;
+ if (e) goto errattr ;
}
- if (e) goto errattr ;
e = posix_spawn_file_actions_init(&actions) ;
if (e) goto errattr ;
e = posix_spawn_file_actions_adddup2(&actions, p[to & 1], to & 1) ;