diff options
author | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-03-06 08:50:51 +0000 |
---|---|---|
committer | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-03-06 08:50:51 +0000 |
commit | dcb2287f15cab53b42fa498f6227346806a84eab (patch) | |
tree | 4bb74be8356cd9e4bc867d6df6337acfc816a01b /lib/shell/process-controller.rb | |
parent | b73acc204308adf8cff999e875d7b719afa22ca3 (diff) | |
download | ruby-dcb2287f15cab53b42fa498f6227346806a84eab.tar.gz ruby-dcb2287f15cab53b42fa498f6227346806a84eab.tar.xz ruby-dcb2287f15cab53b42fa498f6227346806a84eab.zip |
* lib/shell/process-controller.rb: fix thread synchronization problem for [ruby-dev:30477].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/shell/process-controller.rb')
-rw-r--r-- | lib/shell/process-controller.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/shell/process-controller.rb b/lib/shell/process-controller.rb index f74abfd68..892980550 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 } |