summaryrefslogtreecommitdiff
path: root/include/spawn.h
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-03-29 04:50:56 -0500
committerWaldemar Brodkorb <wbx@openadk.org>2015-03-29 04:50:56 -0500
commitcd5f92704e1e17bbc0c15d197f3bc236c7dc9bf2 (patch)
tree1400302b543e4528aedea5d72731983559cfcf36 /include/spawn.h
parentad2bffbf1926051ef333f9899344f6bddf2c03cf (diff)
parent24946289317ea23bb0d1814cca0a499a905f7d6f (diff)
merge uClibc git master
Diffstat (limited to 'include/spawn.h')
-rw-r--r--include/spawn.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/include/spawn.h b/include/spawn.h
index 95fff356f..3de375b41 100644
--- a/include/spawn.h
+++ b/include/spawn.h
@@ -66,15 +66,6 @@ typedef struct
# define POSIX_SPAWN_USEVFORK 0x40
#endif
-
-#define __POSIX_SPAWN_MASK (POSIX_SPAWN_RESETIDS \
- | POSIX_SPAWN_SETPGROUP \
- | POSIX_SPAWN_SETSIGDEF \
- | POSIX_SPAWN_SETSIGMASK \
- | POSIX_SPAWN_SETSCHEDPARAM \
- | POSIX_SPAWN_SETSCHEDULER \
- | POSIX_SPAWN_USEVFORK)
-
__BEGIN_DECLS
/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
@@ -170,12 +161,27 @@ static inline
int posix_spawnattr_setflags (posix_spawnattr_t *_attr,
short int __flags)
{
+#ifdef POSIX_SPAWN_USEVFORK
+# define __POSIX_SPAWN_USEVFORK POSIX_SPAWN_USEVFORK
+#else
+# define __POSIX_SPAWN_USEVFORK 0
+#endif
+#define __POSIX_SPAWN_MASK (POSIX_SPAWN_RESETIDS \
+ | POSIX_SPAWN_SETPGROUP \
+ | POSIX_SPAWN_SETSIGDEF \
+ | POSIX_SPAWN_SETSIGMASK \
+ | POSIX_SPAWN_SETSCHEDPARAM \
+ | POSIX_SPAWN_SETSCHEDULER \
+ | __POSIX_SPAWN_USEVFORK)
+
/* Check no invalid bits are set. */
if (__flags & ~__POSIX_SPAWN_MASK)
return EINVAL;
_attr->__flags = __flags;
return 0;
+#undef __POSIX_SPAWN_USEVFORK
+#undef __POSIX_SPAWN_MASK
}
/* Get process group ID from the attribute structure. */