2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-22 04:45:15 +00:00
restic/cmd/restic
Michael Eischer 1a1c572bac Fix shutdown hang when restic is started as background job
restic uses a cleanup hook to ensure that it restores the terminal
configuration to a sane state, when restic is interrupted while reading
a password from the terminal. However, this causes a problem, when
restic runs in a background job, as reconfiguring a terminal will cause
a SIGTTOU to be sent to restic pausing it. Therefore, restic seems to
hang on shutdown when it was running in the background.

This commit changes the behavior to only restore the terminal
configuration if restic was interrupted while reading a password from
the terminal. As reading a password from the terminal requires that
restic is in the foreground, this should avoid restic getting stopped.

Fixes #2298
Issue introduced in #402
2020-04-12 22:27:09 +02:00
..
testdata Reduce dataset for integration tests 2018-03-11 21:07:47 +01:00
.gitignore Moves files 2017-07-23 14:19:13 +02:00
acl_test.go Restore whole folder to sdtout as tar 2019-04-22 20:44:33 +02:00
acl.go Restore whole folder to sdtout as tar 2019-04-22 20:44:33 +02:00
cleanup.go Return exit code 130 when SIGINT is received 2018-04-20 21:09:50 +02:00
cmd_backup.go backup/global: Use proper name for command line argument parameters 2020-04-03 19:49:04 +02:00
cmd_cache.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_cat.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_check.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_debug.go debug: don't load the repository index 2020-04-04 00:01:01 +02:00
cmd_diff.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_dump.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_find.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_forget.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_generate.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_init.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_key.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_list.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_ls.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_migrate.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_mount.go Remove broken --allow-root from restic mount 2020-03-17 23:35:06 +01:00
cmd_options.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_prune.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_rebuild_index.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_recover.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_restore.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_self_update.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_snapshots.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_stats.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_tag.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_unlock.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_version.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
exclude_test.go Add tests for insensitive variants of filter methods 2018-11-25 13:32:16 +01:00
exclude.go Store reference to reject function for insensitive pattern rejection 2019-01-19 11:08:13 +00:00
find.go Support specifying multiple host flags for various commands 2020-02-26 22:17:59 +01:00
flags_test.go Moves files 2017-07-23 14:19:13 +02:00
format.go Display local time for all commands 2018-11-02 20:36:15 +01:00
global_debug.go Add profile build flag 2018-04-30 14:19:04 +02:00
global_release.go Add profile build flag 2018-04-30 14:19:04 +02:00
global_test.go Ensure Print{,f,ln} use global stdout 2020-02-15 01:32:43 +01:00
global.go Fix shutdown hang when restic is started as background job 2020-04-12 22:27:09 +02:00
integration_fuse_test.go Support NetBSD without fuse 2018-06-16 15:55:04 +09:00
integration_helpers_test.go Support NetBSD without fuse 2018-06-16 15:55:04 +09: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 Support specifying multiple host flags for various commands 2020-02-26 22:17:59 +01:00
local_layout_test.go Support specifying multiple host flags for various commands 2020-02-26 22:17:59 +01:00
lock.go mount: Ignore non-existing locks 2018-02-25 13:11:03 +01:00
main.go Add support for reading password from external command 2018-11-26 20:18:31 +01:00