1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Allow failure of sighandler installation on NativeClient.

* signal.c (install_signalhandler, init_sigchld): allow failure because it
  always fails with ENOSYS on NaCl.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2014-10-11 02:12:00 +00:00
parent 69ac654c90
commit 1a14a7a1d7
2 changed files with 9 additions and 2 deletions

3
io.c
View file

@ -204,6 +204,9 @@ rb_update_max_fd(int fd)
} }
} }
#undef HAVE_FCNTL
#undef O_CLOEXEC
void void
rb_maygvl_fd_fix_cloexec(int fd) rb_maygvl_fd_fix_cloexec(int fd)
{ {

View file

@ -1261,7 +1261,9 @@ install_sighandler(int signum, sighandler_t handler)
rb_enable_interrupt(); rb_enable_interrupt();
return 0; return 0;
} }
#define install_sighandler(signum, handler) (install_sighandler(signum, handler) ? rb_bug(#signum) : (void)0) #ifndef __native_client__
# define install_sighandler(signum, handler) (install_sighandler(signum, handler) ? rb_bug(#signum) : (void)0)
#endif
#if defined(SIGCLD) || defined(SIGCHLD) #if defined(SIGCLD) || defined(SIGCHLD)
static int static int
@ -1281,7 +1283,9 @@ init_sigchld(int sig)
rb_enable_interrupt(); rb_enable_interrupt();
return 0; return 0;
} }
#define init_sigchld(signum) (init_sigchld(signum) ? rb_bug(#signum) : (void)0) # ifndef __native_client__
# define init_sigchld(signum) (init_sigchld(signum) ? rb_bug(#signum) : (void)0)
# endif
#endif #endif
void void