summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-30 00:51:57 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-30 00:51:57 +0000
commitce2a3b40ed06a25e9292dd7d02b311510d0ba8e2 (patch)
tree5150e7c0b581692d5651539ef8a74fef74a8c8bf /vm_core.h
parent47f3c4d1477ebc479a5e0ab4342e1d86604caeb9 (diff)
use SIGCHLD_LOSSY to enable waitpid polling mode
Some systems lack SIGCHLD or have incomplete SIGCHLD implementations. So enable polling mode for them. [ruby-core:87705] [Bug #14867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index bdbe87287b..9db99fe03b 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -100,6 +100,13 @@
# define RUBY_SIGCHLD (0)
#endif
+/* platforms with broken or non-existent SIGCHLD work by polling */
+#if defined(__APPLE__) || defined(__WIN32__)
+# define SIGCHLD_LOSSY (1)
+#else
+# define SIGCHLD_LOSSY (0)
+#endif
+
#ifdef HAVE_STDARG_PROTOTYPES
#include <stdarg.h>
#define va_init_list(a,b) va_start((a),(b))