summaryrefslogtreecommitdiff
path: root/src/libstddjb/child_spawn0.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-05-05 12:50:24 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-05-05 12:50:24 +0000
commit7d06701bfaad445e48832ba4fd189ffc36e34387 (patch)
treec3d0d5da0d9328d950a4da4cc3a4f9d84a3e7033 /src/libstddjb/child_spawn0.c
parent73ebb5709dc2a5aaee1e676a3c1b0bb7cebcd392 (diff)
downloadskalibs-7d06701bfaad445e48832ba4fd189ffc36e34387.tar.xz
- add stat_at
- make case_diff* work as a function is more cases - make sig_number case-insensitive - make child signal unblocking work in child_spawn*
Diffstat (limited to 'src/libstddjb/child_spawn0.c')
-rw-r--r--src/libstddjb/child_spawn0.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstddjb/child_spawn0.c b/src/libstddjb/child_spawn0.c
index 7129515..bb8b29e 100644
--- a/src/libstddjb/child_spawn0.c
+++ b/src/libstddjb/child_spawn0.c
@@ -25,8 +25,7 @@ pid_t child_spawn0 (char const *prog, char const *const *argv, char const *const
sigemptyset(&set) ;
e = posix_spawnattr_setsigmask(&attr, &set) ;
if (e) goto errattr ;
- sigfillset(&set) ;
- e = posix_spawnattr_setsigdefault(&attr, &set) ;
+ e = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK) ;
if (e) goto errattr ;
}
if (!haspath && (setenv("PATH", SKALIBS_DEFAULTPATH, 0) < 0)) { e = errno ; goto errattr ; }
@@ -47,6 +46,7 @@ pid_t child_spawn0 (char const *prog, char const *const *argv, char const *const
#include <unistd.h>
#include <skalibs/allreadwrite.h>
+#include <skalibs/sig.h>
#include <skalibs/djbunix.h>
pid_t child_spawn0 (char const *prog, char const *const *argv, char const *const *envp)
@@ -67,6 +67,7 @@ pid_t child_spawn0 (char const *prog, char const *const *argv, char const *const
if (pid)
{
fd_close(p[0]) ;
+ sig_blocknone() ;
pathexec_run(prog, argv, envp) ;
e = errno ;
fd_write(p[1], (char *)&e, sizeof(e)) ;