func (e *execResponse) start(ch ssh.Channel) (*execResult, error) {
	var err error
	e.cmd, err = prepareCommand(e.ctx)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	e.cmd.Stderr = ch.Stderr()
	e.cmd.Stdout = ch

	inputWriter, err := e.cmd.StdinPipe()
	if err != nil {
		return nil, trace.Wrap(err)
	}
	go func() {
		io.Copy(inputWriter, ch)
		inputWriter.Close()
	}()

	if err := e.cmd.Start(); err != nil {
		e.ctx.Warningf("%v start failure err: %v", e, err)
		return e.collectStatus(e.cmd, trace.ConvertSystemError(err))
	}
	e.ctx.Infof("%v started", e)

	return nil, nil
}
// start launches the given command returns (nil, nil) if successful. execResult is only used
// to communicate an error while launching
start launches the given command returns (nil, nil) if successful. execResult is only used
to communicate an error while launching
// start launches the given command returns ( nil nil ) if successful . execResult is only used // to communicate an error while launching
func (e *execResponse) start(ch ssh.Channel) (*execResult, error) {
	var err error
	e.cmd, err = prepareCommand(e.ctx)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	e.cmd.Stderr = ch.Stderr()
	e.cmd.Stdout = ch
	inputWriter, err := e.cmd.StdinPipe()
	if err != nil {
		return nil, trace.Wrap(err)
	}
	go func() {
		io.Copy(inputWriter, ch)
		inputWriter.Close()
	}()
	if err := e.cmd.Start(); err != nil {
		e.ctx.Warningf("%v start failure err: %v", e, err)
		return e.collectStatus(e.cmd, trace.ConvertSystemError(err))
	}
	e.ctx.Infof("%v started", e)
	return nil, nil
}
func ( e * execResponse ) start ( ch ssh . Channel ) ( * execResult , error ) { var err error e . cmd , err = prepareCommand ( e . ctx ) if err != nil { return nil , trace . Wrap ( err ) } e . cmd . Stderr = ch . Stderr ( ) e . cmd . Stdout = ch inputWriter , err := e . cmd . StdinPipe ( ) if err != nil { return nil , trace . Wrap ( err ) } go func ( ) { io . Copy ( inputWriter , ch ) inputWriter . Close ( ) } ( ) if err := e . cmd . Start ( ) ; err != nil { e . ctx . Warningf ( " " , e , err ) return e . collectStatus ( e . cmd , trace . ConvertSystemError ( err ) ) } e . ctx . Infof ( " " , e ) return nil , nil }
start launches the given command returns (nil, nil) if successful.
start launches the given command returns ( nil nil ) if successful .