Sha256: 499c4f967b2a6423db3ac1cb9608783f45bc93db31f8e3301146e240ece6fd56

Contents?: true

Size: 502 Bytes

Versions: 8

Compression:

Stored size: 502 Bytes

Contents

require 'net/ssh/shell/process'

module Net; module SSH; class Shell
  class Subshell < Process
    protected

    def on_stdout(ch, data)
      if !output!(data)
        ch.on_data(&method(:look_for_finalize_initializer))
        ch.send_data("export PS1=; echo #{manager.separator} $?\n")
      end
    end

    def look_for_finalize_initializer(ch, data)
      if data =~ /#{manager.separator} (\d+)/
        ch.on_close(&@master_onclose)
        finished!($1)
      end
    end
  end
end; end; end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
net-ssh-session-0.1.6 lib/net/ssh/shell/subshell.rb
net-ssh-session-0.1.5 lib/net/ssh/shell/subshell.rb
net-ssh-session-0.1.4 lib/net/ssh/shell/subshell.rb
net-ssh-session-0.1.3 lib/net/ssh/shell/subshell.rb
net-ssh-session-0.1.2 lib/net/ssh/shell/subshell.rb
net-ssh-session-0.1.1 lib/net/ssh/shell/subshell.rb
net-ssh-session-0.1.0 lib/net/ssh/shell/subshell.rb
net-ssh-shell-0.2.0 lib/net/ssh/shell/subshell.rb