This commit is contained in:
greatroar
2020-05-24 19:32:19 +02:00
committed by Michael Eischer
parent 18531e3d6f
commit 3b09ae9074
5 changed files with 44 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
// +build aix solaris
package backend
import (
"os/exec"
"syscall"
"github.com/restic/restic/internal/errors"
)
func startForeground(cmd *exec.Cmd) (bg func() error, err error) {
// run the command in it's own process group so that SIGINT
// is not sent to it.
cmd.SysProcAttr = &syscall.SysProcAttr{
Setpgid: true,
}
// start the process
err = cmd.Start()
if err != nil {
return nil, errors.Wrap(err, "cmd.Start")
}
bg = func() error { return nil }
return bg, nil
}