diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-04 04:57:58 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-04 04:57:58 +0000 |
commit | 782576a5199264be07fd9d5be1629eca4aa92c7d (patch) | |
tree | c448c7bc115621d95e7587facae74db0cf59140a /signal.c | |
parent | ea465ecda743fdfb1fb007ef951ff352e647102f (diff) |
* ext/curses/curses.c (window_getch): avoid ISPRINT() macro which
has an issue with OpenSolaris. [ruby-core:20189]
* signal.c (ruby_signal): EINVAL from sigaction(2) is not a bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -15,6 +15,7 @@ #include "vm_core.h" #include <signal.h> #include <stdio.h> +#include <errno.h> #ifdef _WIN32 typedef LONG rb_atomic_t; @@ -474,8 +475,11 @@ ruby_signal(int signum, sighandler_t handler) if (signum == SIGSEGV) sigact.sa_flags |= SA_ONSTACK; #endif - if (sigaction(signum, &sigact, &old) < 0) - rb_bug("sigaction error.\n"); + if (sigaction(signum, &sigact, &old) < 0) { + if (errno != 0 && errno != EINVAL) { + rb_bug("sigaction error.\n"); + } + } return old.sa_handler; } |