diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-05-27 16:20:23 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-05-27 16:28:25 +0200 |
commit | 787cd0769f045e3c61d1005788fac3179f29cc53 (patch) | |
tree | c9418e66616e20fafe765e773aec0c27a13d0b33 /testing/ruby-posix-spawn/0001-Only-use-POSIX_SPAWN_USEVFORK-if-defined-or-if-GNU-l.patch | |
parent | 031ea716821860461a103a98931aefc87ee1e6b8 (diff) | |
download | aports-787cd0769f045e3c61d1005788fac3179f29cc53.tar.bz2 aports-787cd0769f045e3c61d1005788fac3179f29cc53.tar.xz |
testing/ruby-posix-spawn: new aport
posix-spawn uses posix_spawnp(2) for faster process spawning
http://rubygems.org/gems/posix-spawn
Diffstat (limited to 'testing/ruby-posix-spawn/0001-Only-use-POSIX_SPAWN_USEVFORK-if-defined-or-if-GNU-l.patch')
-rw-r--r-- | testing/ruby-posix-spawn/0001-Only-use-POSIX_SPAWN_USEVFORK-if-defined-or-if-GNU-l.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/ruby-posix-spawn/0001-Only-use-POSIX_SPAWN_USEVFORK-if-defined-or-if-GNU-l.patch b/testing/ruby-posix-spawn/0001-Only-use-POSIX_SPAWN_USEVFORK-if-defined-or-if-GNU-l.patch new file mode 100644 index 0000000000..3779295bda --- /dev/null +++ b/testing/ruby-posix-spawn/0001-Only-use-POSIX_SPAWN_USEVFORK-if-defined-or-if-GNU-l.patch @@ -0,0 +1,32 @@ +From d8872a3274bb6d5b0ab327c4b85792009970c841 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Tue, 27 May 2014 15:20:28 +0200 +Subject: [PATCH] Only use POSIX_SPAWN_USEVFORK if defined or if GNU libc + +musl libc does not have it + +fixes #54 +--- + ext/posix-spawn.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ext/posix-spawn.c b/ext/posix-spawn.c +index 501423d..29101f8 100644 +--- a/ext/posix-spawn.c ++++ b/ext/posix-spawn.c +@@ -396,9 +396,9 @@ rb_posixspawn_pspawn(VALUE self, VALUE env, VALUE argv, VALUE options) + sigemptyset(&mask); + posix_spawnattr_setsigmask(&attr, &mask); + +-#if defined(POSIX_SPAWN_USEVFORK) || defined(__linux__) +- /* Force USEVFORK on linux. If this is undefined, it's probably because +- * you forgot to define _GNU_SOURCE at the top of this file. ++#if defined(POSIX_SPAWN_USEVFORK) || defined(__GLIBC__) ++ /* Force USEVFORK on GNU libc. If this is undefined, it's probably ++ * because you forgot to define _GNU_SOURCE at the top of this file. + */ + flags |= POSIX_SPAWN_USEVFORK; + #endif +-- +1.9.3 + |