rclone/lib/atexit
Nick Craig-Wood cdfa0beafb lib/atexit: ensure OnError only calls cancel function once
Before this change the cancelFunc could be called twice, once while
handling the interrupt (CTRL-C) and once while unwinding the stack if
the function happened to finish.

This change ensure the cancelFunc is only called once by wrapping it
in a sync.Once
2023-03-22 12:50:58 +00:00
..
atexit_other.go build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
atexit_test.go atexit: Terminate with non-zero status after receiving signal 2021-07-07 17:59:26 +01:00
atexit_unix.go build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
atexit.go lib/atexit: ensure OnError only calls cancel function once 2023-03-22 12:50:58 +00:00