mirror of
https://github.com/restic/restic.git
synced 2025-12-13 12:52:34 +00:00
simplify message printing when restic receives signal
This commit is contained in:
@@ -23,7 +23,7 @@ func createGlobalContext() context.Context {
|
|||||||
func cleanupHandler(c <-chan os.Signal, cancel context.CancelFunc) {
|
func cleanupHandler(c <-chan os.Signal, cancel context.CancelFunc) {
|
||||||
s := <-c
|
s := <-c
|
||||||
debug.Log("signal %v received, cleaning up", s)
|
debug.Log("signal %v received, cleaning up", s)
|
||||||
Warnf("%ssignal %v received, cleaning up\n", clearLine(0), s)
|
Warnf("\rsignal %v received, cleaning up \n", s)
|
||||||
|
|
||||||
if val, _ := os.LookupEnv("RESTIC_DEBUG_STACKTRACE_SIGINT"); val != "" {
|
if val, _ := os.LookupEnv("RESTIC_DEBUG_STACKTRACE_SIGINT"); val != "" {
|
||||||
_, _ = os.Stderr.WriteString("\n--- STACKTRACE START ---\n\n")
|
_, _ = os.Stderr.WriteString("\n--- STACKTRACE START ---\n\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user