Module: Ansible::SafePty
- Defined in:
- lib/ansible/safe_pty.rb
Class Method Summary collapse
Class Method Details
.spawn(command) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/ansible/safe_pty.rb', line 4 def self.spawn(command) PTY.spawn(command) do |r,w,p| begin yield r,w,p if block_given? rescue Errno::EIO nil # ignore Errno::EIO: Input/output error @ io_fillbuf ensure Process.wait p end end $?.exitstatus end |