Closed
Description
All the strings are taken as AsRef<OsStr>
and converted to CString
with unwrapping: https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/process.rs#L83-L85
An example for Command::new
(playground):
use std::process::Command;
fn main() {
Command::new("\0");
}
The panic should be documented, or the conversion unwrap should be delayed until a call to one of the methods that start the process so that the error can be returned in a Result
.
Version:
$ rustc --version --verbose
rustc 1.5.0 (3d7cd77e4 2015-12-04)
binary: rustc
commit-hash: 3d7cd77e442ce34eaac8a176ae8be17669498ebc
commit-date: 2015-12-04
host: x86_64-unknown-linux-gnu
release: 1.5.0