diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-06-01 13:29:51 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-06-01 13:31:29 +0300 |
commit | f6baa2aad98a418cd21b857f825e772a987b7c93 (patch) | |
tree | 510f68566eabbb6c8960020099b454ee5819bd18 /main/musl/0036-implement-new-posix_spawn-flag-POSIX_SPAWN_SETSID.patch | |
parent | acf34d0e48d8c8999406c748bfcf68c1ba61ddae (diff) | |
download | aports-f6baa2aad98a418cd21b857f825e772a987b7c93.tar.bz2 aports-f6baa2aad98a418cd21b857f825e772a987b7c93.tar.xz |
main/musl: cherry-pick upstream fixes, add strftime gnu extensions
ref #5907
Diffstat (limited to 'main/musl/0036-implement-new-posix_spawn-flag-POSIX_SPAWN_SETSID.patch')
-rw-r--r-- | main/musl/0036-implement-new-posix_spawn-flag-POSIX_SPAWN_SETSID.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/main/musl/0036-implement-new-posix_spawn-flag-POSIX_SPAWN_SETSID.patch b/main/musl/0036-implement-new-posix_spawn-flag-POSIX_SPAWN_SETSID.patch new file mode 100644 index 0000000000..4e39d63697 --- /dev/null +++ b/main/musl/0036-implement-new-posix_spawn-flag-POSIX_SPAWN_SETSID.patch @@ -0,0 +1,44 @@ +From bb439bb17108b67f3df9c9af824d3a607b5b059d Mon Sep 17 00:00:00 2001 +From: Rich Felker <dalias@aerifal.cx> +Date: Sat, 22 Apr 2017 18:39:40 -0400 +Subject: [PATCH] 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. +--- + include/spawn.h | 1 + + src/process/posix_spawn.c | 4 ++++ + 2 files changed, 5 insertions(+) + +diff --git a/include/spawn.h b/include/spawn.h +index 29c799ee..f3e9e23c 100644 +--- a/include/spawn.h ++++ b/include/spawn.h +@@ -21,6 +21,7 @@ struct sched_param; + #define POSIX_SPAWN_SETSIGMASK 8 + #define POSIX_SPAWN_SETSCHEDPARAM 16 + #define POSIX_SPAWN_SETSCHEDULER 32 ++#define POSIX_SPAWN_SETSID 128 + + typedef struct { + int __flags; +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; +-- +2.13.0 + |