Skip to content

Commit 0826a79

Browse files
committed
Update snapshot.rs
1 parent 478bf7c commit 0826a79

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

crates/sandchest-agent/src/snapshot.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ fn kill_orphaned_processes() {
118118
#[cfg(target_os = "linux")]
119119
{
120120
let my_pid = std::process::id();
121+
122+
// Only kill orphans when running as PID 1 (inside a Firecracker VM).
123+
// In tests or on CI runners, this would kill unrelated processes.
124+
if my_pid != 1 {
125+
return;
126+
}
127+
121128
let mut killed = 0u32;
122129

123130
if let Ok(entries) = std::fs::read_dir("/proc") {

0 commit comments

Comments
 (0)