fix sysprocattr
This commit is contained in:
parent
2b190eccb7
commit
a693fb5cd6
1 changed files with 1 additions and 1 deletions
|
@ -76,6 +76,7 @@ func (cmd *LinuxCommand) Run() error {
|
|||
}
|
||||
|
||||
command := exec.Command(cmd.Options.Shell, "-c", sourceCommand.String()+cmd.Options.Command+commandOptions.String())
|
||||
command.SysProcAttr = &unix.SysProcAttr{Setsid: true}
|
||||
command.Dir = cmd.Options.Cwd
|
||||
|
||||
for key, value := range cmd.Options.Env {
|
||||
|
@ -85,7 +86,6 @@ func (cmd *LinuxCommand) Run() error {
|
|||
var signalChannel chan os.Signal
|
||||
|
||||
if len(cmd.handlers) != 0 {
|
||||
command.SysProcAttr = &unix.SysProcAttr{Setsid: true}
|
||||
signalChannel = make(chan os.Signal, 1)
|
||||
signal.Notify(signalChannel, unix.SIGINT, unix.SIGTERM)
|
||||
|
||||
|
|
Loading…
Reference in a new issue