forked from TrueCloudLab/restic
Create ignoreSigIntProcAttr()
Retrieve the SysProcAttr from a separate function. Completely eliminates syscall from main file.
This commit is contained in:
parent
520b1b65b0
commit
0e7d0d8dba
3 changed files with 16 additions and 7 deletions
|
@ -6,7 +6,8 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// ignore signals sent to the parent (e.g. SIGINT)
|
||||
sysProcAttr = syscall.SysProcAttr{Setsid: true}
|
||||
// ignoreSigIntProcAttr returns a syscall.SysProcAttr that
|
||||
// disables SIGINT on parent.
|
||||
func ignoreSigIntProcAttr() *syscall.SysProcAttr {
|
||||
return &syscall.SysProcAttr{Setsid: true}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue