From 7d797336aa800dd9cf4a2b476df6a11965275760 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Fri, 24 Nov 2023 21:42:37 +0400 Subject: Don't propagate overwritten RUST_{,LIB_}BACKTRACE --- src/utils.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/utils.rs') diff --git a/src/utils.rs b/src/utils.rs index a04b8e9b..94b5c427 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -5,6 +5,7 @@ use std::os::unix::process::CommandExt; use std::path::PathBuf; use std::process::{Command, Stdio}; use std::ptr::null_mut; +use std::sync::atomic::{AtomicBool, Ordering}; use std::time::Duration; use anyhow::{ensure, Context}; @@ -53,6 +54,9 @@ pub fn make_screenshot_path(config: &Config) -> anyhow::Result> Ok(Some(path)) } +pub static REMOVE_ENV_RUST_BACKTRACE: AtomicBool = AtomicBool::new(false); +pub static REMOVE_ENV_RUST_LIB_BACKTRACE: AtomicBool = AtomicBool::new(false); + /// Spawns the command to run independently of the compositor. pub fn spawn(command: impl AsRef, args: impl IntoIterator>) { let _span = tracy_client::span!(); @@ -66,6 +70,14 @@ pub fn spawn(command: impl AsRef, args: impl IntoIterator