mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-26 06:50:09 +03:00
parent
e1086b9838
commit
5549872f5c
@ -179,13 +179,23 @@ private
|
||||
i.write stdin_data
|
||||
i.close
|
||||
|
||||
out = [out_reader.value, err_reader.value, t.value]
|
||||
# blocking wait for process termination
|
||||
t.value
|
||||
|
||||
# if reader threads are not dead yet, kill them
|
||||
[out_reader, err_reader].each do |reader|
|
||||
next unless reader.status
|
||||
|
||||
reader.join(0.1)
|
||||
reader.kill
|
||||
end
|
||||
|
||||
mutex.lock
|
||||
terminator.kill
|
||||
raise terminator_e if terminator_e
|
||||
|
||||
out
|
||||
# return values
|
||||
[out_reader.value, err_reader.value, t.value]
|
||||
}
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user