1
0
mirror of https://github.com/restic/restic.git synced 2024-06-27 07:55:08 +02:00
restic/cmd/restic
Michael Pratt e4c469c149 debug: properly handle interrupted profiles
By default (i.e., without profile.NoShutdownHook), profile.Start listens
for SIGINT and will stop the profile and call os.Exit(0).

restic already listens for SIGINT and runs its own cleanup handlers
before calling os.Exit(0).

As is, these handlers are racing when an interrupt occurs, and in my
experience, restic tends to win the race, resulting in an unusable
profile.

Eliminate the race and properly stop profiles on interrupt by disabling
package profile's signal handler and instead stop the profile in a
restic cleanup handler.
2017-08-28 22:03:26 -07:00
..
testdata Moves files 2017-07-23 14:19:13 +02:00
.gitignore Moves files 2017-07-23 14:19:13 +02:00
background_linux.go Run goimports 2017-07-23 14:21:03 +02:00
background.go Moves files 2017-07-23 14:19:13 +02:00
cleanup.go Run goimports 2017-07-23 14:21:03 +02:00
cmd_autocomplete.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_backup.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_cat.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_check.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_dump.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_find.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_forget.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_init.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_key.go Change key rm command to key remove 2017-08-17 11:03:26 -03:00
cmd_list.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_ls.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_manpage.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_migrate.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_mount.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_options.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_prune.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_rebuild_index.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_restore.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_snapshots.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_tag.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_unlock.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
cmd_version.go manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
find.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
flags_test.go Moves files 2017-07-23 14:19:13 +02:00
format.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
global_debug.go debug: properly handle interrupted profiles 2017-08-28 22:03:26 -07:00
global_release.go debug: properly handle interrupted profiles 2017-08-28 22:03:26 -07:00
global.go Merge pull request #1149 from restic/azure-support 2017-08-09 21:30:35 +02:00
integration_fuse_test.go Rework withTestEnvironment 2017-07-24 21:32:34 +02:00
integration_helpers_test.go Rework withTestEnvironment 2017-07-24 21:32:34 +02:00
integration_helpers_unix_test.go Moves files 2017-07-23 14:19:13 +02:00
integration_helpers_windows_test.go Moves files 2017-07-23 14:19:13 +02:00
integration_test.go Change key rm command to key remove 2017-08-17 11:03:26 -03:00
local_layout_test.go Rework withTestEnvironment 2017-07-24 21:32:34 +02:00
lock.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
main.go debug: properly handle interrupted profiles 2017-08-28 22:03:26 -07:00
table.go Moves files 2017-07-23 14:19:13 +02:00