debugoff icon indicating copy to clipboard operation
debugoff copied to clipboard

Starting a subprocess breaks debugoff

Open desbma opened this issue 3 months ago • 0 comments

Code that calls ptraceme_or_die before starting a subprocess through any mean (ie std::process::Command) will crash. Simple reproducer:

fn main() {
    debugoff::ptraceme_or_die();

    std::process::Command::new("echo")
        .arg("subprocess")
        .status()
        .unwrap();

    println!("exit");
}

Outputs:

$ cargo run
   Compiling test_debugoff v0.1.0 (/home/desbma/src/test_debugoff)
    Finished dev [unoptimized + debuginfo] target(s) in 0.21s
     Running `target/debug/test_debugoff`
subprocess
zsh: death of child  cargo run
$ echo $?
145

I haven't yet spent time to investigate, although I am willing to help.

desbma avatar Mar 13 '24 16:03 desbma