mirror of https://github.com/borgbackup/borg.git
use prepared env for borg export-tar --tar-filter subprocess
(cherry picked from commit cf59f653e5
)
This commit is contained in:
parent
d6f810560c
commit
d7a5ca2e6a
|
@ -790,10 +790,12 @@ class Archiver:
|
||||||
# The decision whether to close that or not remains the same.
|
# The decision whether to close that or not remains the same.
|
||||||
filterout = tarstream
|
filterout = tarstream
|
||||||
filterout_close = tarstream_close
|
filterout_close = tarstream_close
|
||||||
|
env = prepare_subprocess_env(system=True)
|
||||||
# There is no deadlock potential here (the subprocess docs warn about this), because
|
# There is no deadlock potential here (the subprocess docs warn about this), because
|
||||||
# communication with the process is a one-way road, i.e. the process can never block
|
# communication with the process is a one-way road, i.e. the process can never block
|
||||||
# for us to do something while we block on the process for something different.
|
# for us to do something while we block on the process for something different.
|
||||||
filterproc = popen_with_error_handling(filter, stdin=subprocess.PIPE, stdout=filterout, log_prefix='--tar-filter: ')
|
filterproc = popen_with_error_handling(filter, stdin=subprocess.PIPE, stdout=filterout,
|
||||||
|
log_prefix='--tar-filter: ', env=env)
|
||||||
if not filterproc:
|
if not filterproc:
|
||||||
return EXIT_ERROR
|
return EXIT_ERROR
|
||||||
# Always close the pipe, otherwise the filter process would not notice when we are done.
|
# Always close the pipe, otherwise the filter process would not notice when we are done.
|
||||||
|
|
Loading…
Reference in New Issue