Skip to content

Commit 8eea9a5

Browse files
Nullify scheduler during terminate_atfork_i. (ruby#15354)
1 parent 4c56001 commit 8eea9a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

thread.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4979,6 +4979,9 @@ static void
49794979
terminate_atfork_i(rb_thread_t *th, const rb_thread_t *current_th)
49804980
{
49814981
if (th != current_th) {
4982+
// Clear the scheduler as it is no longer operational:
4983+
th->scheduler = Qnil;
4984+
49824985
rb_native_mutex_initialize(&th->interrupt_lock);
49834986
rb_mutex_abandon_keeping_mutexes(th);
49844987
rb_mutex_abandon_locking_mutex(th);

0 commit comments

Comments
 (0)