* thread_pthread.c (native_stop_timer_thread): skip to close
communication pipe to avoid timing bug (process termination timing). The communication pipe will closed by OS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e9c1783bbd
commit
87dadf3b8c
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jun 29 06:21:02 2011 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* thread_pthread.c (native_stop_timer_thread): skip to close
|
||||||
|
communication pipe to avoid timing bug (process termination timing).
|
||||||
|
The communication pipe will closed by OS.
|
||||||
|
|
||||||
Wed Jun 29 06:09:54 2011 Koichi Sasada <ko1@atdot.net>
|
Wed Jun 29 06:09:54 2011 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* error.c (rb_async_bug_errno): async-safe bug report function.
|
* error.c (rb_async_bug_errno): async-safe bug report function.
|
||||||
|
@ -1189,10 +1189,13 @@ native_stop_timer_thread(int close_anyway)
|
|||||||
/* close communication pipe */
|
/* close communication pipe */
|
||||||
if (close_anyway) {
|
if (close_anyway) {
|
||||||
/* TODO: Uninstall all signal handlers or mask all signals.
|
/* TODO: Uninstall all signal handlers or mask all signals.
|
||||||
* This pass is cleaning phase. It is too rare case
|
* This pass is cleaning phase (terminate ruby process).
|
||||||
* to generate problem, so we remains it in TODO.
|
* To avoid such race, we skip to close communication
|
||||||
|
* pipe. OS will close it at process termination.
|
||||||
|
* It may not good practice, but pragmatic.
|
||||||
|
* We remain it is TODO.
|
||||||
*/
|
*/
|
||||||
close_communication_pipe();
|
/* close_communication_pipe(); */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return stopped;
|
return stopped;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user