backend/util: extract background handling code

This commit is contained in:
Michael Eischer
2025-09-07 11:58:02 +02:00
parent cc1fe6c111
commit 6ff7cd9050
6 changed files with 10 additions and 9 deletions
+2 -2
View File
@@ -21,9 +21,9 @@ import (
"github.com/restic/restic/internal/backend/limiter"
"github.com/restic/restic/internal/backend/location"
"github.com/restic/restic/internal/backend/rest"
"github.com/restic/restic/internal/backend/util"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/terminal"
"golang.org/x/net/http2"
)
@@ -82,7 +82,7 @@ func run(command string, args ...string) (*StdioConn, *sync.WaitGroup, chan stru
cmd.Stdin = r
cmd.Stdout = w
bg, err := util.StartForeground(cmd)
bg, err := terminal.StartForeground(cmd)
// close rclone side of pipes
errR := r.Close()
errW := w.Close()