Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

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

Nick Craig-Woodcb460928832c
diff --git a/lib/atexit/atexit.go b/lib/atexit/atexit.go
index 2740a769f..c7b37238a 100644
--- a/lib/atexit/atexit.go
+++ b/lib/atexit/atexit.go
@@ -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()