Skip to content

Commit

Permalink
Set-up the environment outside of rr_jll's influence.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Jul 23, 2022
1 parent f5bec83 commit 12e0fbe
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/BugReporting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,16 @@ function rr_record(args...; trace_dir=nothing)
check_rr_available()
check_perf_event_paranoid()

rr() do rr_path
new_env = copy(ENV)
if trace_dir !== nothing
new_env["_RR_TRACE_DIR"] = trace_dir
end
new_env = copy(ENV)
if trace_dir !== nothing
new_env["_RR_TRACE_DIR"] = trace_dir
end

# loading GDB_jll sets PYTHONHOME via Python_jll. this only matters for replay,
# and shouldn't leak into the Julia environment (which may load its own Python)
delete!(new_env, "PYTHONHOME")
# loading GDB_jll sets PYTHONHOME via Python_jll. this only matters for replay,
# and shouldn't leak into the Julia environment (which may load its own Python)
delete!(new_env, "PYTHONHOME")

# Intersperse all given arguments with spaces, then splat:
rr() do rr_path
rr_cmd = `$(rr_path) record $(global_record_flags)`
for arg in args
rr_cmd = `$(rr_cmd) $(arg)`
Expand Down

0 comments on commit 12e0fbe

Please sign in to comment.