From 835f040be29b1a32f93428a6a90de7978b7c2779 Mon Sep 17 00:00:00 2001 From: keiju Date: Tue, 6 Mar 2007 08:50:51 +0000 Subject: * lib/shell/process-controller.rb: fix thread synchronization problem for [ruby-dev:30477]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/shell/process-controller.rb | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8e0d04471..9faa919112 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Mar 6 16:35:04 2007 Keiju Ishitsuka + + * lib/shell/process-controller.rb: fix thread synchronization problem for [ruby-dev:30477]. + Tue Mar 6 11:53:25 2007 Hidetoshi NAGAI * ext/tk/sample/irbtkw.rbw: fails to exit process. diff --git a/lib/shell/process-controller.rb b/lib/shell/process-controller.rb index f74abfd686..8929805506 100644 --- a/lib/shell/process-controller.rb +++ b/lib/shell/process-controller.rb @@ -246,9 +246,11 @@ class Shell redo end Thread.exclusive do - terminate_job(command) - @job_condition.signal - command.notify "job(%id) finish.", @shell.debug? + @job_monitor.synchronize do + terminate_job(command) + @job_condition.signal + command.notify "job(%id) finish.", @shell.debug? + end end end } -- cgit v1.2.3