use crate::child::{Child, SuspendedChild};
use crate::command::Command;
use crate::error::Error;
pub(crate) fn refusal(_cmd: &Command) -> Error {
Error::Unsupported {
op: "spawn_suspended".into(),
platform: std::env::consts::OS,
detail: "a suspended spawn is implemented on Windows only: a POSIX child cannot be held \
before it runs without a gate in the child before exec, which std's blocking spawn \
does not allow"
.into(),
source: None,
}
}
pub(super) fn spawn(cmd: &mut Command) -> Result<SuspendedChild, Error> {
Err(refusal(cmd))
}
pub(super) fn release(_child: &Child) -> std::io::Result<()> {
unreachable!("spawn_suspended never returns a SuspendedChild off Windows")
}