class POSIX::Spawn::Child
def initialize(*args)
executed to completion. The out, err, and status attributes are
Returns a new Child instance whose underlying process has already
Setting this option true implies :pgroup => true.
group (true) or individual process (false, default).
:pgroup_kill => bool Boolean specifying whether to kill the process
MaximumOutputExceeded exception.
process to generate before aborting with a
:max => total Maximum number of bytes of output to allow the
exception.
to execute before aborting with a TimeoutExceeded
:timeout => int Maximum number of seconds to allow the process
:input => str Write str to the new process's standard input.
POSIX::Spawn options:
The following options are supported in addition to the standard
new([env], command, [argv1, ...], [options])
in the POSIX::Spawn module documentation:
the program to exit. Supports the standard spawn interface as described
Spawn a new process, write all input and read all output, and wait for
def initialize(*args) @env, @argv, options = extract_process_spawn_arguments(*args) @options = options.dup @input = @options.delete(:input) @timeout = @options.delete(:timeout) @max = @options.delete(:max) if @options.delete(:pgroup_kill) @pgroup_kill = true @options[:pgroup] = true end @options.delete(:chdir) if @options[:chdir].nil? exec! if !@options.delete(:noexec) end