You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because we cannot extract and inspect the std::process::Stdio from the std::process::Command builder passed to Sandbox::spawn(), we cannot determine at runtime whether to pipe or inherit our stdin/stdout/stderr descriptors. As a result, Bastille currently defaults to Stdio::inherit() for all three by default and can be switched to piped stdin/stdout/stderr if compiled with the piped Cargo feature.
This is not at all ideal, but fixing this requires resolving rust-lang/rust#44434 and also finding some way to inspect whether a given std::process::Stdio is set to "inherit," "piped," or "null."
An alternative but less desirable approach would be to implement our own in-crate Stdio type like how we currently do with Child. Still, it would be best to reuse as many std::process types as possible when configuring and spawning commands in Bastille.
The text was updated successfully, but these errors were encountered:
At the time of writing, we use Cargo features to set the stdio configuration for the launched process. This is not ideal and will be replaced by a dedicated Rust API in the future, but the approach works well enough for now. The following modes are available, as defined in the Cargo.toml:
Because we cannot extract and inspect the
std::process::Stdio
from thestd::process::Command
builder passed toSandbox::spawn()
, we cannot determine at runtime whether to pipe or inherit our stdin/stdout/stderr descriptors. As a result, Bastille currently defaults toStdio::inherit()
for all three by default and can be switched to piped stdin/stdout/stderr if compiled with thepiped
Cargo feature.This is not at all ideal, but fixing this requires resolving rust-lang/rust#44434 and also finding some way to inspect whether a given
std::process::Stdio
is set to "inherit," "piped," or "null."An alternative but less desirable approach would be to implement our own in-crate
Stdio
type like how we currently do withChild
. Still, it would be best to reuse as manystd::process
types as possible when configuring and spawning commands in Bastille.The text was updated successfully, but these errors were encountered: