mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 02:01:25 +08:00
lib/atexit: unregister interrupt handler once it has fired so users can interrupt again
This commit is contained in:
parent
a2cd5d8fa3
commit
cb46092883
|
@ -46,6 +46,7 @@ func Register(fn func()) FnHandle {
|
||||||
if sig == nil {
|
if sig == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
signal.Stop(exitChan)
|
||||||
atomic.StoreInt32(&signalled, 1)
|
atomic.StoreInt32(&signalled, 1)
|
||||||
fs.Infof(nil, "Signal received: %s", sig)
|
fs.Infof(nil, "Signal received: %s", sig)
|
||||||
Run()
|
Run()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user