mirror of
https://github.com/tuna/tunasync.git
synced 2025-06-14 13:32:43 +00:00
ignore the SIGTERM failure
This commit is contained in:
parent
b34238c097
commit
2ba3a27fa3
@ -149,10 +149,10 @@ func (c *cmdJob) Terminate() error {
|
|||||||
select {
|
select {
|
||||||
case <-time.After(2 * time.Second):
|
case <-time.After(2 * time.Second):
|
||||||
unix.Kill(c.cmd.Process.Pid, syscall.SIGKILL)
|
unix.Kill(c.cmd.Process.Pid, syscall.SIGKILL)
|
||||||
return errors.New("SIGTERM failed to kill the job")
|
logger.Warningf("SIGTERM failed to kill the job in 2s. SIGKILL sent")
|
||||||
case <-c.finished:
|
case <-c.finished:
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copied from go-sh
|
// Copied from go-sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user