mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* signal.c (ruby_signal, ruby_nativethread_signal): must be valid as
expressions, not only statements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6b80542ead
commit
6f6b9a9b54
2 changed files with 17 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Feb 22 23:50:26 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* signal.c (ruby_signal, ruby_nativethread_signal): must be valid as
|
||||||
|
expressions, not only statements.
|
||||||
|
|
||||||
Tue Feb 22 07:24:57 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Feb 22 07:24:57 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* parse.y (parser_yylex): identifier after dot must not be a variable.
|
* parse.y (parser_yylex): identifier after dot must not be a variable.
|
||||||
|
|
14
signal.c
14
signal.c
|
@ -386,9 +386,19 @@ posix_nativethread_signal(signum, handler)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#else /* !POSIX_SIGNAL */
|
#else /* !POSIX_SIGNAL */
|
||||||
#define ruby_signal(sig,handler) {rb_trap_accept_nativethreads[sig] = 0; signal((sig),(handler));}
|
#define ruby_signal(sig,handler) (rb_trap_accept_nativethreads[sig] = 0, signal((sig),(handler)))
|
||||||
#ifdef HAVE_NATIVETHREAD
|
#ifdef HAVE_NATIVETHREAD
|
||||||
#define ruby_nativethread_signal(sig,handler) {signal((sig),(handler));rb_trap_accept_nativethreads[sig] = 1;}
|
static sighandler_t
|
||||||
|
ruby_nativethread_signal(signum, handler)
|
||||||
|
int signum;
|
||||||
|
sighandler_t handler;
|
||||||
|
{
|
||||||
|
sighandler_t old;
|
||||||
|
|
||||||
|
old = signal(signum, handler);
|
||||||
|
rb_trap_accept_nativethreads[signum] = 1;
|
||||||
|
return old;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue