From ce8fb33087b449f8d0c18dafd35e0d5503d60192 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 16 Oct 2023 20:11:28 +0200 Subject: [PATCH] Redirect subprocess output to /dev/null --- src/trace.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/trace.rs b/src/trace.rs index bd38fa4..cbb52c3 100644 --- a/src/trace.rs +++ b/src/trace.rs @@ -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, }; @@ -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()));