summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-28 21:23:40 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-28 21:23:40 +0000
commit87dadf3b8cd9b8bd2d5a5ba1a5009e289447f08a (patch)
tree952ca51d3c87a3fe44d9a13639037eca88702d79 /thread_pthread.c
parente9c1783bbd3d1acbc53bd20bcb6cfe62dc4af5ba (diff)
* 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
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 420a3f4db5..016ee32abb 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1189,10 +1189,13 @@ native_stop_timer_thread(int close_anyway)
/* close communication pipe */
if (close_anyway) {
/* TODO: Uninstall all signal handlers or mask all signals.
- * This pass is cleaning phase. It is too rare case
- * to generate problem, so we remains it in TODO.
+ * This pass is cleaning phase (terminate ruby process).
+ * 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;