зеркало из https://github.com/github/ruby.git
Initialize interrupt queue before signal handlers (#9196)
This commit is contained in:
Родитель
1e5c8afb15
Коммит
9f0065a077
2
inits.c
2
inits.c
|
@ -51,7 +51,6 @@ rb_call_inits(void)
|
|||
CALL(Dir);
|
||||
CALL(Time);
|
||||
CALL(Random);
|
||||
CALL(signal);
|
||||
CALL(load);
|
||||
CALL(Proc);
|
||||
CALL(Binding);
|
||||
|
@ -63,6 +62,7 @@ rb_call_inits(void)
|
|||
CALL(VM);
|
||||
CALL(ISeq);
|
||||
CALL(Thread);
|
||||
CALL(signal);
|
||||
CALL(Fiber_Scheduler);
|
||||
CALL(process);
|
||||
CALL(Cont);
|
||||
|
|
3
signal.c
3
signal.c
|
@ -1488,6 +1488,9 @@ Init_signal(void)
|
|||
rb_alias(rb_eSignal, rb_intern_const("signm"), rb_intern_const("message"));
|
||||
rb_define_method(rb_eInterrupt, "initialize", interrupt_init, -1);
|
||||
|
||||
// It should be ready to call rb_signal_exec()
|
||||
VM_ASSERT(GET_THREAD()->pending_interrupt_queue);
|
||||
|
||||
/* At this time, there is no subthread. Then sigmask guarantee atomics. */
|
||||
rb_disable_interrupt();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче