lib/blocks/block.rb in bake-toolkit-2.34.4 vs lib/blocks/block.rb in bake-toolkit-2.35.0

- old
+ new

@@ -131,11 +131,11 @@ res << d end # prioo 3: check if dir exists without Project.meta entry Bake.options.roots.each do |r| - absIncDir = r+"/"+d + absIncDir = r.dir+"/"+d if File.exists?(absIncDir) res << File.rel_from_to_project(@projectDir,absIncDir,false) end end @@ -260,20 +260,21 @@ # which might not be changed due to backward compatibility. # the control handler works only with programs compiled under Cygwin, which is # not true for Windows RubyInstaller packages. ctrl_c_found = false begin - while IO.select([$stdin],nil,nil,0) do - nextChar = $stdin.sysread(1) - if nextChar == "\x03" - ctrl_c_found = true + @@mutexStdinSelect.synchronize do + while IO.select([$stdin],nil,nil,0) do + nextChar = $stdin.sysread(1) + if nextChar == "\x03" + ctrl_c_found = true + end end end rescue Exception => e end raise AbortException.new if ctrl_c_found - return @result end def callDeps(method) depResult = true @@ -318,10 +319,11 @@ if not Bake::IDEInterface.instance.get_abort SyncOut.mutex.synchronize do Bake.formatter.printError("Error: #{ex1.message}") puts ex1.backtrace if Bake.options.debug end + end end if !exceptionOccured @result = false @@delayed_result = false @@ -492,9 +494,10 @@ def self.init_threads() @@threads = [] @@result = true @@mutex = Mutex.new + @@mutexStdinSelect = Mutex.new Bake::Multithread::Jobs.init_semaphore() end def startup return true if (@visited) \ No newline at end of file