Skip to content

Commit

Permalink
Redirect subprocess output to /dev/null
Browse files Browse the repository at this point in the history
  • Loading branch information
boozec committed Oct 16, 2023
1 parent 74c390e commit ce8fb33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ use nix::{
};
use std::{
fs::File,
// fs::File,
io::{self, Write},
os::unix::process::CommandExt,
process::Command,
process::{Command, Stdio},
str,
};

Expand All @@ -23,6 +22,7 @@ pub fn exec(command: &str) -> anyhow::Result<()> {

let mut command = Command::new(params[0]);
command.args(params[1..].iter());
command.stdout(Stdio::null());

unsafe {
command.pre_exec(|| ptrace::traceme().map_err(|e| e.into()));
Expand Down

0 comments on commit ce8fb33

Please sign in to comment.