Skip to content

Commit

Permalink
Fix input buffering by nulling childproc stdin (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
ifd3f authored May 19, 2024
1 parent 4e0b833 commit 620c3d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/escalation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
mod darwin;
mod unix;

use std::process::Stdio;

pub use self::unix::Command;

#[derive(Debug, thiserror::Error)]
Expand All @@ -25,6 +27,7 @@ pub async fn run_escalate(

let mut cmd: tokio::process::Command = EscalationMethod::detect()?.wrap_command(cmd).into();
modify(&mut cmd);
cmd.stdin(Stdio::null());
Ok(cmd.spawn()?)
}

Expand Down

0 comments on commit 620c3d1

Please sign in to comment.