pub mod logging;
pub mod metrics;
pub mod process;
pub use process::process_utils::{
build_command_environment, decode_process_line_lossy, hide_window_for_std_command,
hide_window_for_tokio_command, preferred_bash_shell, render_command_line,
trace_windows_command, windows_command_trace_enabled, CommandEnvironmentDiagnostics,
CommandEnvironmentSource, PreparedCommandEnvironment, PythonDiscoveryDiagnostics, ShellCommand,
};
pub use process::{
ProcessHandle, ProcessInfo, ProcessRegistrationConfig, ProcessRegistry, ProcessType,
};
#[cfg(any(test, feature = "test-utils"))]
pub use process::process_utils::{
clear_command_environment_cache_for_tests, prime_command_environment_cache_for_tests,
};
pub mod process_utils {
pub use crate::process::process_utils::*;
}
pub mod registry {
pub use crate::process::registry::*;
}
#[cfg(any(test, feature = "test-utils"))]
pub mod test_support {
use std::sync::{Mutex, MutexGuard, OnceLock};
pub fn env_cache_lock() -> &'static Mutex<()> {
static LOCK: OnceLock<Mutex<()>> = OnceLock::new();
LOCK.get_or_init(|| Mutex::new(()))
}
pub fn env_cache_lock_acquire() -> MutexGuard<'static, ()> {
env_cache_lock()
.lock()
.unwrap_or_else(|poisoned| poisoned.into_inner())
}
}