Class: Hokaido::Broadcast::Command
- Inherits:
-
Object
- Object
- Hokaido::Broadcast::Command
- Includes:
- Celluloid
- Defined in:
- lib/hokaido/broadcast.rb
Instance Method Summary collapse
-
#initialize(command, host, port) ⇒ Command
constructor
A new instance of Command.
- #wait_for_exit(pid) ⇒ Object
Constructor Details
#initialize(command, host, port) ⇒ Command
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/hokaido/broadcast.rb', line 65 def initialize(command, host, port) ptyout, , pid = PTY.getpty(command) connection = Connection.new_link(host, port) # FIXME: adjust on SIGWINCH adjust_screen_size OutputHandler.new_link ptyout, connection InputHandler.new_link async.wait_for_exit pid end |
Instance Method Details
#wait_for_exit(pid) ⇒ Object
78 79 80 81 82 |
# File 'lib/hokaido/broadcast.rb', line 78 def wait_for_exit(pid) Process.waitpid pid terminate end |