2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 19:08:55 +00:00
restic/internal/backend
Michael Eischer 8554332894 rclone: Close rclone side of stdio_conn pipes
restic did not notice when the rclone subprocess exited unexpectedly.

restic manually created pipes for stdin and stdout and used these for the
connection to the rclone subprocess. The process creating a pipe gets
file descriptors for the sender and receiver side of a pipe and passes
them on to the subprocess. The expected behavior would be that reads or
writes in the parent process fail / return once the child process dies
as a pipe would now just have a reader or writer but not both.

However, this never happened as restic kept the reader and writer
file descriptors of the pipes. `cmd.StdinPipe` and `cmd.StdoutPipe`
close the subprocess side of pipes once the child process was started
and close the parent process side of pipes once wait has finished. We
can't use these functions as we need access to the raw `os.File` so just
replicate that behavior.
2020-07-26 00:29:25 +02:00
..
azure simplified prefix removal, removed unnecessary if-else statements 2019-06-30 23:34:47 +03:00
b2 b2: simplify object iteration 2018-10-05 11:39:02 -07:00
gs simplified prefix removal, removed unnecessary if-else statements 2019-06-30 23:34:47 +03:00
local remove unused code 2019-07-01 00:24:45 +03:00
location Add rclone backend 2018-04-01 10:16:31 +02:00
mem backend: Improve Save() 2018-03-03 15:49:44 +01:00
rclone rclone: Close rclone side of stdio_conn pipes 2020-07-26 00:29:25 +02:00
rest backend/rest: Ensure base URL ends with slash 2018-04-01 10:18:38 +02:00
s3 Merge pull request #2484 from restic/add-s3-region 2019-11-22 15:51:17 +01:00
sftp Revert "Put host last in SSH command line" 2020-03-08 16:45:33 +01:00
swift remove unused code 2019-07-01 00:24:45 +03:00
test Remove 'go generate' 2020-07-19 17:28:42 +02:00
testdata Moves files 2017-07-23 14:19:13 +02:00
backend_error.go backend: Improve Save() 2018-03-03 15:49:44 +01:00
backend_retry_test.go backend: Improve Save() 2018-03-03 15:49:44 +01:00
backend_retry.go Update vendored library github.com/cenkalti/backoff 2018-03-30 11:45:27 +02:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
foreground_solaris.go Move backend/sftp.StartForeground to backend/ 2018-04-01 10:16:31 +02:00
foreground_unix.go Move backend/sftp.StartForeground to backend/ 2018-04-01 10:16:31 +02:00
foreground_windows.go Add rclone backend 2018-04-01 10:16:31 +02:00
http_transport.go http backend: Parse the correct argument when loading --tls-client-cert 2018-04-30 15:21:09 -07:00
layout_default.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_rest.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_s3legacy.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_test.go simplified string sorting by using a more suitable function 2019-06-30 23:20:32 +03:00
layout.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
paths.go Moves files 2017-07-23 14:19:13 +02:00
semaphore.go swift backend: fix premature release of semaphore in Load() & document 2017-11-02 12:38:17 -04:00
shell_split_test.go Refactor SplitShellStrings 2018-04-01 10:16:31 +02:00
shell_split.go Refactor SplitShellStrings 2018-04-01 10:16:31 +02:00
utils_test.go Add []byte to repo.LoadAndDecrypt and utils.LoadAll 2019-04-13 13:38:39 +02:00
utils.go Flatten backend.LimitedReadCloser structure 2020-06-17 13:11:45 +02:00