func NewExternalAgentProcess(path string, env []string, logWriter io.Writer) ExternalAgentProcess {
	command := exec.Command(path)
	command.Env = env
	w := NewNewlineSplitWriter(logWriter)
	command.Stdout = w
	command.Stderr = w
	command.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
	return ExternalAgentProcess{
		cmd: command,
	}
}
NewExternalAgentProcess returns a new external agent process
package agents
import (
	"fmt"
	"io"
	"io/ioutil"
	"os/exec"
	"path"
	"syscall"
	log "github.com/sirupsen/logrus"
)
type AgentProcess interface {
	Name() string
}
type ExternalAgentProcess struct {
	cmd *exec.Cmd
}