mirror of
https://github.com/restic/restic.git
synced 2026-07-17 04:34:53 +00:00
Merge pull request #3152 from MichaelEischer/fix-backup-background-hang
backup: Fix shutdown hang when running in the background on linux
This commit is contained in:
@@ -96,11 +96,9 @@ func (t *Terminal) run(ctx context.Context) {
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
if IsProcessBackground(t.fd) {
|
||||
// ignore all messages, do nothing, we are in the background process group
|
||||
continue
|
||||
if !IsProcessBackground(t.fd) {
|
||||
t.undoStatus(len(status))
|
||||
}
|
||||
t.undoStatus(len(status))
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user