lib/angry_shell.rb
# This is taken from Chef and rewritten.
#
# Chef's preamble:
# This is taken directly from Ara T Howard's Open4 library, and then 
# modified to suit the needs of Chef.  Any bugs here are most likely
# my own, and not Ara's.
#
# The original appears in external/open4.rb in its unmodified form. 
#
# Thanks Ara!
This is taken from Chef and rewritten.
Chef's preamble:
This is taken directly from Ara T Howard's Open4 library, and then
modified to suit the needs of Chef.  Any bugs here are most likely
my own, and not Ara's.

The original appears in external/open4.rb in its unmodified form.

Thanks Ara!
This is taken from Chef and rewritten . Chef ' s preamble : This is taken directly from Ara T Howard ' s Open4 library and then modified to suit the needs of Chef . Any bugs here are most likely my own and not Ara ' s . The original appears in external / open4 . rb in its unmodified form . Thanks Ara!
def popen4(args={}, &blk)
      popen4_normalise_args(args)
      ipc = IPCState.new
      verbose = $VERBOSE
      cid = begin
        $VERBOSE = nil
        ipc.before_fork!
        fork {
          popen4_proceed_as_child(args,ipc)
        }
      ensure
        $VERBOSE = verbose
      end
      popen4_proceed_as_parent(cid,args,ipc,&blk)
    end
def popen4 ( args = { } , & blk ) popen4_normalise_args ( args ) ipc = IPCState . new verbose = $VERBOSE cid = begin $VERBOSE = nil ipc . before_fork! fork { popen4_proceed_as_child ( args , ipc ) } ensure $VERBOSE = verbose end popen4_proceed_as_parent ( cid , args , ipc , & blk ) end
This is taken from Chef and rewritten.
This is taken from Chef and rewritten .
# We pass and manipulate all IPC pipes around inside this object.
args
blk