We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Command::get_kill_on_drop()
1 parent 6fc1a8c commit 6bd3be2Copy full SHA for 6bd3be2
tokio/src/process/mod.rs
@@ -981,6 +981,26 @@ impl Command {
981
982
async { child?.wait_with_output().await }
983
}
984
+
985
+ /// Returns the boolean value that was previously set by [`Command::kill_on_drop`].
986
+ ///
987
+ /// Note that if you have not previously called [`Command::kill_on_drop`], the
988
+ /// default value of `false` will be returned here.
989
990
+ /// # Examples
991
992
+ /// ```
993
+ /// use tokio::process::Command;
994
995
+ /// let mut cmd = Command::new("echo");
996
+ /// assert!(!cmd.get_kill_on_drop());
997
998
+ /// cmd.kill_on_drop(true);
999
+ /// assert!(cmd.get_kill_on_drop());
1000
1001
+ pub fn get_kill_on_drop(&self) -> bool {
1002
+ self.kill_on_drop
1003
+ }
1004
1005
1006
impl From<StdCommand> for Command {
0 commit comments