2022-09-07 05:11:09 +00:00
|
|
|
// ./src/std_misc/process.md
|
|
|
|
|
|
|
|
|
|
|
|
use std::process::Command;
|
2022-09-07 05:19:49 +00:00
|
|
|
/*
|
2022-09-07 05:11:09 +00:00
|
|
|
fn part0() {
|
|
|
|
let output = Command::new("rustc")
|
|
|
|
.arg("--version")
|
|
|
|
.output().unwrap_or_else(|e| {
|
|
|
|
panic!("failed to execute process: {}", e)
|
|
|
|
});
|
|
|
|
|
|
|
|
if output.status.success() {
|
|
|
|
let s = String::from_utf8_lossy(&output.stdout);
|
|
|
|
|
|
|
|
print!("rustc succeeded and stdout was:\n{}", s);
|
|
|
|
} else {
|
|
|
|
let s = String::from_utf8_lossy(&output.stderr);
|
|
|
|
|
|
|
|
print!("rustc failed and stderr was:\n{}", s);
|
|
|
|
}
|
2022-09-07 05:19:49 +00:00
|
|
|
}*/
|
2022-09-07 05:11:09 +00:00
|
|
|
|
|
|
|
pub fn main() {
|
2022-09-07 05:19:49 +00:00
|
|
|
// part0();
|
2022-09-07 05:11:09 +00:00
|
|
|
}
|
|
|
|
|