lib/kafo/kafo_configure.rb in kafo-0.0.14 vs lib/kafo/kafo_configure.rb in kafo-0.0.15
- old
+ new
@@ -193,12 +193,12 @@
PTY.spawn(command) do |stdin, stdout, pid|
begin
stdin.each { |line| puppet_log(line) }
rescue Errno::EIO
if PTY.respond_to?(:check) # ruby >= 1.9.2
- exit_code = PTY.check(pid).exitstatus
+ exit_code = PTY.check(pid, true).exitstatus
else # ruby < 1.9.2
- Process.wait(pid)
+ Process.wait(pid) rescue Errno::ECHILD
exit_code = $?.exitstatus
end
end
end
rescue PTY::ChildExited => e