Problem
All of the current functions in std::process::Command
are based around a non-blocking spawn
implementation. This is a problem for targets where it is possible to execute programs but no concept of processes or threads.
I am working on implementing Rust std for UEFI, which is one such case. To get a working implementation of std::process::Command
, I had to make Command::spawn
blocking (and wait till execution ends for the launched program). More about this can be found in the PR
Proposal
Add a blocking spawn/execute
function in sys::{target}::process::Command
and use this function for std::process::Command::output
implementation. This should have minimal to no functionality impact but will help decouple Command::output
from Command::spawn
.