lib/frontkick/command.rb in frontkick-0.2.0 vs lib/frontkick/command.rb in frontkick-0.2.1
- old
+ new
@@ -36,13 +36,13 @@
ensure
stdin.close if stdin and !stdin.closed?
out.close if out and !out.closed?
err.close if err and !err.closed?
wait_thr.kill if wait_thr and !wait_thr.stop?
- lock_fd.flock(File::LOCK_UN)
+ lock_fd.flock(File::LOCK_UN) if lock_fd
end
- CommandResult.new(stdout, stderr, exit_code, duration)
+ CommandResult.new(:stdout => stdout, :stderr => stderr, :exit_code => exit_code, :duration => duration)
end
def self.process_wait(pid)
begin
pid, status = Process.waitpid2(pid) # wait child processes finish