mirror of
https://github.com/restic/restic.git
synced 2025-11-15 12:03:09 +00:00
AIX port
This commit is contained in:
committed by
Michael Eischer
parent
18531e3d6f
commit
3b09ae9074
27
internal/backend/foreground_sysv.go
Normal file
27
internal/backend/foreground_sysv.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user