summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Knaack <davidkna@users.noreply.github.com>2022-01-03 15:14:19 +0100
committerGitHub <noreply@github.com>2022-01-03 09:14:19 -0500
commit35eae3fb4ae12f0ebd84ec44883675a28c3029cf (patch)
tree9a07a360d307efbb7216dd4748a552dba9113a6b
parent86be86d729352742ef08af9117fe512be46ddfcf (diff)
refactor(process_control): switch to new API (#3385)
-rw-r--r--src/utils.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 8e05ac27d..f75546ee5 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1,4 +1,4 @@
-use process_control::{ChildExt, Timeout};
+use process_control::{ChildExt, Control};
use std::ffi::OsStr;
use std::fmt::Debug;
use std::fs::read_to_string;
@@ -393,7 +393,12 @@ pub fn exec_timeout(cmd: &mut Command, time_limit: Duration) -> Option<CommandOu
return None;
}
};
- match process.with_output_timeout(time_limit).terminating().wait() {
+ match process
+ .controlled_with_output()
+ .time_limit(time_limit)
+ .terminate_for_timeout()
+ .wait()
+ {
Ok(Some(output)) => {
let stdout_string = match String::from_utf8(output.stdout) {
Ok(stdout) => stdout,