run_interruptible

Function run_interruptible 

Source
pub async fn run_interruptible<C, A, S>(command: C, args: A) -> Result<i32>
where C: AsRef<OsStr>, A: IntoIterator<Item = S>, S: AsRef<OsStr>,
Expand description

Runs the given command with the given arguments and returns its exit code.

This command is interruptible by passing one of the following signals to Rokit:

  • SIGINT (Ctrl+C)
  • SIGTERM
  • SIGQUIT

Note that on Windows, only SIGINT (Ctrl+C) is supported, but the process may also be reaped as part of the current job group.

ยงErrors

  • If signal listeners could not be created
  • If the given command could not be spawned