diff options
| author | Kamal Marhubi <kamal@marhubi.com> | 2016-01-15 15:29:45 -0500 |
|---|---|---|
| committer | Kamal Marhubi <kamal@marhubi.com> | 2016-02-03 10:54:29 -0500 |
| commit | 7c64bf1b9b6e8e97ab652a4922f1c0e68ebc77f0 (patch) | |
| tree | 52eef97ff332e10c18c7469df5d296fc4f64ef0f /src/libstd/sys/unix/ext/process.rs | |
| parent | 28bed3f5e64dfc083dc193412b65d95533a61d72 (diff) | |
| download | rust-7c64bf1b9b6e8e97ab652a4922f1c0e68ebc77f0.tar.gz rust-7c64bf1b9b6e8e97ab652a4922f1c0e68ebc77f0.zip | |
std: Properly handle interior NULs in std::process
This reports an error at the point of calling `Command::spawn()` or one of its equivalents. Fixes https://github.com/rust-lang/rust/issues/30858 Fixes https://github.com/rust-lang/rust/issues/30862
Diffstat (limited to 'src/libstd/sys/unix/ext/process.rs')
| -rw-r--r-- | src/libstd/sys/unix/ext/process.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/ext/process.rs b/src/libstd/sys/unix/ext/process.rs index e1111f25db7..212aeb0406e 100644 --- a/src/libstd/sys/unix/ext/process.rs +++ b/src/libstd/sys/unix/ext/process.rs @@ -49,17 +49,17 @@ pub trait CommandExt { #[stable(feature = "rust1", since = "1.0.0")] impl CommandExt for process::Command { fn uid(&mut self, id: uid_t) -> &mut process::Command { - self.as_inner_mut().uid = Some(id); + self.as_inner_mut().uid(id); self } fn gid(&mut self, id: gid_t) -> &mut process::Command { - self.as_inner_mut().gid = Some(id); + self.as_inner_mut().gid(id); self } fn session_leader(&mut self, on: bool) -> &mut process::Command { - self.as_inner_mut().session_leader = on; + self.as_inner_mut().session_leader(on); self } } |
