mirror of
https://github.com/openai/codex.git
synced 2026-11-07 00:33:29 +00:00
Detach non-interactive subprocesses from stdin (#34612)
## What changed Redirect stdin to null when launching: - `codex doctor --json` for uploaded diagnostic reports - Git commands used by `codex doctor` - ripgrep searches over rollout files - the Windows sandbox setup refresh helper This keeps these non-interactive subprocesses from reading Codex's inherited input stream. GitOrigin-RevId: 063d191b0b1b849d74b55a7d6ff2f0b3d5212c86
This commit is contained in:
1 parent
c7e3838987
commit
dfd2d8133c
5 files changed
+11
-2
No files matched your search
@@ -8,6 +8,7 @@
|
||||
//! attaching exactly the same JSON a user could copy from the CLI.
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::process::Stdio;
|
||||
use std::time::Duration;
|
||||
|
||||
use codex_core::config::Config;
|
||||
@@ -42,6 +43,7 @@ pub(crate) async fn doctor_feedback_report(config: &Config) -> Option<DoctorFeed
|
||||
|
||||
let mut command = Command::new(&executable);
|
||||
command.arg("doctor").arg("--json");
|
||||
command.stdin(Stdio::null());
|
||||
command.kill_on_drop(/*kill_on_drop*/ true);
|
||||
let output = match timeout(DOCTOR_FEEDBACK_REPORT_TIMEOUT, command.output()).await {
|
||||
Ok(Ok(output)) => output,
|
||||
|
||||
Reference in new issue
Block a user