diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-05-28 18:39:43 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-05-28 18:39:43 -0400 |
commit | d6c0c9784615ddb316ace52f3a9e2f025214ba2a (patch) | |
tree | 05830fa91d36e845825d8086c7a259dc39af1c78 /src/process | |
parent | c97f0d998cae23472ea30564663a8612dcfb6f83 (diff) | |
download | musl-d6c0c9784615ddb316ace52f3a9e2f025214ba2a.tar.gz musl-d6c0c9784615ddb316ace52f3a9e2f025214ba2a.tar.bz2 musl-d6c0c9784615ddb316ace52f3a9e2f025214ba2a.tar.xz musl-d6c0c9784615ddb316ace52f3a9e2f025214ba2a.zip |
posix_spawn: honor POSIX_SPAWN_SETSIGDEF flag
Diffstat (limited to 'src/process')
-rw-r--r-- | src/process/posix_spawn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/process/posix_spawn.c b/src/process/posix_spawn.c index e718cee3..7018c37e 100644 --- a/src/process/posix_spawn.c +++ b/src/process/posix_spawn.c @@ -31,7 +31,9 @@ int __posix_spawnx(pid_t *res, const char *path, for (i=1; i<=64; i++) { struct sigaction sa; sigaction(i, 0, &sa); - if (sa.sa_handler!=SIG_IGN || sigismember(&attr->__def, i)) { + if (sa.sa_handler!=SIG_IGN || + ((attr->__flags & POSIX_SPAWN_SETSIGDEF) + && sigismember(&attr->__def, i) )) { sa.sa_handler = SIG_DFL; sigaction(i, &sa, 0); } |