Project

General

Profile

Bug #4169 ยป 0001-reset-thread-lock-state-at-fork.patch

kosaki (Motohiro KOSAKI), 12/20/2010 12:57 AM

View differences:

thread.c
2780 2780
	    rb_mutex_abandon_all(th->keeping_mutexes);
2781 2781
	}
2782 2782
	th->keeping_mutexes = NULL;
2783

  
2784
	/* Perhaps native thread locking state in libc is unstable value.
2785
	 * We need reset it before thread destroying. Otherwise we may see
2786
	 * insane deadlock scenario.
2787
	 */
2788
	native_mutex_initialize(&th->interrupt_lock);
2789
	native_thread_init(th);
2790

  
2783 2791
	thread_cleanup_func(th);
2784 2792
    }
2785 2793
    return ST_CONTINUE;
2786
-