fix: set kill_on_drop and explicit stdio pipes so curl doesn't inherit parent fds

This commit is contained in:
M1 2026-03-18 12:59:34 +04:00
parent 79bf7d9295
commit 94200b430f
1 changed files with 5 additions and 1 deletions

View File

@ -178,7 +178,11 @@ async fn run_curl(
.arg("--connect-timeout").arg(format!("{:.1}", timeout_secs))
.arg("-X").arg(method)
.arg("--user-agent").arg("PingQL-Monitor/0.1")
.arg("--location"); // follow redirects
.arg("--location") // follow redirects
.stdin(std::process::Stdio::null())
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
.kill_on_drop(true); // kill if future is dropped
if let Some(hdrs) = headers {
for (k, v) in hdrs {