def start(command_and_args = [], output_to_wait_for = nil, wait_timeout = nil, env = {}, opts = {})
      out_r, out_w = IO.pipe
      @out_log = ProcessLog.new(out_r, @opts).start
      if opts[:stderr]
        err_r, err_w = IO.pipe
        @err_log = ProcessLog.new(err_r, @opts).start
      else
        err_w = out_w
      end
      @pid = spawn(env, *command_and_args, :out => out_w, :err => err_w)
      out_w.close
      err_w.close if opts[:stderr]
      @out_log.wait_for_output(output_to_wait_for, :timeout => wait_timeout) unless output_to_wait_for.nil?
    end
def start(command_and_args = [], output_to_wait_for = nil, wait_timeout = nil, env = {}, opts = {})
      out_r, out_w = IO.pipe
      @out_log = ProcessLog.new(out_r, @opts).start
      if opts[:stderr]
        err_r, err_w = IO.pipe
        @err_log = ProcessLog.new(err_r, @opts).start
      else
        err_w = out_w
      end
      @pid = spawn(env, *command_and_args, :out => out_w, :err => err_w)
      out_w.close
      err_w.close if opts[:stderr]
      @out_log.wait_for_output(output_to_wait_for, :timeout => wait_timeout) unless output_to_wait_for.nil?
    end
opts can contain:
 :print_lines:: echo the STDOUT and STDERR of the process to STDOUT as well as capturing them.
 :poll_rate:: rate, in seconds (default is 0.25) to poll the capturered output for matching lines.
 Starts a process defined by `command_and_args`
 command_and_args:: Array with the first element as the process to start, the rest being the parameters to the new process.
 output_to_wait_for:: Regex containing expected output, +start+ will block until a line of STDOUT matches this regex, if this is nil, then no waiting occurs.
 wait_timeout:: Timeout while waiting for particular output.
 env:: Hash of extra environment variables with which to start the process.