diff options
author | Rich Felker <dalias@aerifal.cx> | 2017-04-22 18:39:40 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2017-04-22 18:39:40 -0400 |
commit | bb439bb17108b67f3df9c9af824d3a607b5b059d (patch) | |
tree | d8c5d468a5b26e502cf6889852a76e59044c72ad /src/process | |
parent | 58e2396a9aa23c132faf4198ca4d779c84955b38 (diff) | |
download | musl-bb439bb17108b67f3df9c9af824d3a607b5b059d.tar.gz |
implement new posix_spawn flag POSIX_SPAWN_SETSID
this functionality has been adopted for inclusion in the next issue of
POSIX as the result of Austin Group issue #1044.
based on patch by Daurnimator.
Diffstat (limited to 'src/process')
-rw-r--r-- | src/process/posix_spawn.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/process/posix_spawn.c b/src/process/posix_spawn.c index 0bdf71cd..ea5d2998 100644 --- a/src/process/posix_spawn.c +++ b/src/process/posix_spawn.c @@ -73,6 +73,10 @@ static int child(void *args_vp) __libc_sigaction(i, &sa, 0); } + if (attr->__flags & POSIX_SPAWN_SETSID) + if ((ret=__syscall(SYS_setsid)) < 0) + goto fail; + if (attr->__flags & POSIX_SPAWN_SETPGROUP) if ((ret=__syscall(SYS_setpgid, 0, attr->__pgrp))) goto fail; |