EM::DeferrableChildProcess is a sugaring of a common use-case involving EM::popen. Call the # method on EM::DeferrableChildProcess, passing a command-string. # immediately returns an EM::Deferrable object. It also schedules the forking of a child process, which will execute the command passed to #. When the forked child terminates, the Deferrable will be signalled and execute its callbacks, passing the data that the child process wrote to stdout.
Sugars a common use-case involving forked child processes. # takes a String argument containing an shell command string (including arguments if desired). # immediately returns an EventMachine::Deferrable object, without blocking.
It also invokes EventMachine#popen to run the passed-in command in a forked child process.
When the forked child terminates, the Deferrable that # calls its callbacks, passing the data returned from the child process.
# File lib/em/processes.rb, line 59 59: def self.open cmd 60: EventMachine.popen( cmd, DeferrableChildProcess ) 61: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.