зеркало из https://github.com/github/ruby.git
* 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:
Родитель
6b80542ead
Коммит
6f6b9a9b54
|
@ -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>
|
||||
|
||||
* 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
|
||||
#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
|
||||
#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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче