lib/em-ssh/shell.rb
# Create a new shell using the same ssh connection. A connection will be
# established if this shell is not connected.
#
# If a block is provided the call to split must be inside of a Fiber. The
# child will be closed after yielding. The block will not be yielded
# until the remote PTY has been opened.
#
# @yield [Shell] child
# @return [Shell] child
Create a new shell using the same ssh connection. A connection will be
established if this shell is not connected.

If a block is provided the call to split must be inside of a Fiber. The
child will be closed after yielding. The block will not be yielded
until the remote PTY has been opened.
Create a new shell using the same ssh connection . A connection will be established if this shell is not connected . If a block is provided the call to split must be inside of a Fiber . The child will be closed after yielding . The block will not be yielded until the remote PTY has been opened .
def split
        connect unless connected?
        child = self.class.new(host, user, pass, {:session => session, :parent => self}.merge(options))
        child.line_terminator = line_terminator
        children.push(child)
        child.on(:closed) do
          children.delete(child)
          fire(:childless).tap{ info("fired :childless") } if children.empty?
        end
        fire(:split, child)
        if block_given?
          child.open
          yield(child).tap { child.close }
        else
          child
        end
      end
def split connect unless connected? child = self . class . new ( host , user , pass , { :session => session , :parent => self } . merge ( options ) ) child . line_terminator = line_terminator children . push ( child ) child . on ( :closed ) do children . delete ( child ) fire ( :childless ) . tap { info ( "fired :childless" ) } if children . empty? end fire ( :split , child ) if block_given? child . open yield ( child ) . tap { child . close } else child end end
Create a new shell using the same ssh connection.
Create a new shell using the same ssh connection .
# requires that the caller be in a Fiber
None
Shell
]
<not_specific>
None