mirror of
https://github.com/restic/restic.git
synced 2026-10-29 11:35:42 +00:00
sftp: Use own process group for ssh subprocess
This commit is contained in:
1 parent
4a2e0b5423
commit
281eea9c05
2 files changed
+13
-1
No files matched your search
@@ -49,7 +49,9 @@ func lockRepository(repo *repository.Repository, exclusive bool) (*restic.Lock,
|
||||
}
|
||||
|
||||
func unlockRepo(lock *restic.Lock) error {
|
||||
debug.Log("unlockRepo", "unlocking repository")
|
||||
if err := lock.Unlock(); err != nil {
|
||||
debug.Log("unlockRepo", "error while unlocking: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -67,8 +69,10 @@ func unlockAll() error {
|
||||
debug.Log("unlockAll", "unlocking %d locks", len(globalLocks))
|
||||
for _, lock := range globalLocks {
|
||||
if err := lock.Unlock(); err != nil {
|
||||
debug.Log("unlockAll", "error while unlocking: %v", err)
|
||||
return err
|
||||
}
|
||||
debug.Log("unlockAll", "successfully removed lock")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user