Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though

This commit is contained in:
Ryan Ward
2026-05-07 11:29:34 -05:00
parent f4e2475c60
commit a41cbd8cc7
2433 changed files with 14208 additions and 9409 deletions
+36
View File
@@ -0,0 +1,36 @@
//! Thin wrapper around ripgrep for searching files.
pub mod search;
#[cfg(not(target_family = "wasm"))]
mod types;
/// On Unix, monitor the parent PID and exit this process if it changes.
///
/// This is used by the ripgrep worker process to ensure we don't keep
/// searching if the main Warp process has exited.
#[cfg(unix)]
pub fn monitor_parent_and_exit_on_change(parent_pid: Option<u32>) {
use nix::unistd::Pid;
use std::{thread, time::Duration};
let expected_parent = match parent_pid {
Some(pid) => Pid::from_raw(pid as i32),
None => return,
};
thread::spawn(move || {
loop {
// If we've been reparented to a different process, the original
// parent died so we should exit.
if Pid::parent() != expected_parent {
log::info!(
"ripgrep helper: detected parent pid change (expected {expected_parent}); \
exiting search process."
);
std::process::exit(0);
}
thread::sleep(Duration::from_secs(1));
}
});
}