forked from TrueCloudLab/restic
Only use Setsid on Unix.
Setsid is not a part of syscall.SysProcAttr on Windows, so we only set that on systems that have it.
This commit is contained in:
parent
7c84d810d3
commit
2dcb527828
2 changed files with 15 additions and 1 deletions
12
backend/sftp/sftp_unix.go
Normal file
12
backend/sftp/sftp_unix.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
// +build !windows
|
||||
|
||||
package sftp
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// ignore signals sent to the parent (e.g. SIGINT)
|
||||
sysProcAttr = syscall.SysProcAttr{Setsid: true}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue