forked from TrueCloudLab/restic
8554332894
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. |
||
---|---|---|
.. | ||
azure | ||
b2 | ||
gs | ||
local | ||
location | ||
mem | ||
rclone | ||
rest | ||
s3 | ||
sftp | ||
swift | ||
test | ||
testdata | ||
backend_error.go | ||
backend_retry.go | ||
backend_retry_test.go | ||
doc.go | ||
foreground_solaris.go | ||
foreground_unix.go | ||
foreground_windows.go | ||
http_transport.go | ||
layout.go | ||
layout_default.go | ||
layout_rest.go | ||
layout_s3legacy.go | ||
layout_test.go | ||
paths.go | ||
semaphore.go | ||
shell_split.go | ||
shell_split_test.go | ||
utils.go | ||
utils_test.go |