lib/coderunner/class_methods.rb in coderunner-0.14.19 vs lib/coderunner/class_methods.rb in coderunner-0.14.20
- old
+ new
@@ -365,10 +365,10 @@
processes.each do |wpid|
# Make sure all previously submitted jobs have finished.
sleep refresh.to_i while %x[ps -e -o pid,ppid].split("\n").grep(Regexp.new("^\\s*#{wpid}\\s+#{ppid}")).size > 0
end
#p ["command", command]
- exec(command)
+ exec(command + "; wait")
end
`cp #{tl}/queue_status.txt #{tl}/queue_status2.txt; ps > #{tl}/queue_status.txt`
mutex.synchronize{processes.push pid}
File.open(tl + '/' + id + '.pid', 'w'){|file| file.puts pid}