File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -146,9 +146,12 @@ def start_process(
146146 # see https://github.com/JonathonReinhart/staticx#run-time-information
147147 cmd = [f"{ staticx_dir } /.staticx.interp" , "--library-path" , staticx_dir ] + cmd
148148 else :
149- # explicitly remove our directory from LD_LIBRARY_PATH
150149 env = env if env is not None else os .environ .copy ()
151- env .update ({"LD_LIBRARY_PATH" : "" })
150+ # ensure `TMPDIR` env is propagated to the child processes (used by staticx)
151+ if "TMPDIR" not in env and "TMPDIR" in os .environ :
152+ env ["TMPDIR" ] = os .environ ["TMPDIR" ]
153+ # explicitly remove our directory from LD_LIBRARY_PATH
154+ env ["LD_LIBRARY_PATH" ] = ""
152155
153156 if is_windows ():
154157 cur_preexec_fn = None # preexec_fn is not supported on Windows platforms. subprocess.py reports this.
You can’t perform that action at this time.
0 commit comments