1
mirror of https://github.com/rclone/rclone synced 2024-12-24 15:43:45 +01:00

lib/atexit: unregister interrupt handler once it has fired so users can interrupt again

This commit is contained in:
Nick Craig-Wood 2021-03-22 20:45:07 +00:00
parent a2cd5d8fa3
commit cb46092883

View File

@ -46,6 +46,7 @@ func Register(fn func()) FnHandle {
if sig == nil {
return
}
signal.Stop(exitChan)
atomic.StoreInt32(&signalled, 1)
fs.Infof(nil, "Signal received: %s", sig)
Run()