diff options
| author | Eric Huss <eric@huss.org> | 2020-09-21 11:32:06 -0700 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2020-09-26 18:58:38 -0700 |
| commit | c297e20e03452c659b6d3f026ce4beee42ed8738 (patch) | |
| tree | 0c20b7dc582d780b8a00cdbb2965767b24cf3ce9 /library/std/src/sys/unix/process/process_unix.rs | |
| parent | 623fb90b5a1f324e0ec44085116bf858cef19a00 (diff) | |
| download | rust-c297e20e03452c659b6d3f026ce4beee42ed8738.tar.gz rust-c297e20e03452c659b6d3f026ce4beee42ed8738.zip | |
Add accessors to Command.
Diffstat (limited to 'library/std/src/sys/unix/process/process_unix.rs')
| -rw-r--r-- | library/std/src/sys/unix/process/process_unix.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs index 08efe154e4c..50f5e78cf2a 100644 --- a/library/std/src/sys/unix/process/process_unix.rs +++ b/library/std/src/sys/unix/process/process_unix.rs @@ -245,7 +245,7 @@ impl Command { *sys::os::environ() = envp.as_ptr(); } - libc::execvp(self.get_program().as_ptr(), self.get_argv().as_ptr()); + libc::execvp(self.get_program_cstr().as_ptr(), self.get_argv().as_ptr()); Err(io::Error::last_os_error()) } @@ -383,7 +383,7 @@ impl Command { let envp = envp.map(|c| c.as_ptr()).unwrap_or_else(|| *sys::os::environ() as *const _); let ret = libc::posix_spawnp( &mut p.pid, - self.get_program().as_ptr(), + self.get_program_cstr().as_ptr(), file_actions.0.as_ptr(), attrs.0.as_ptr(), self.get_argv().as_ptr() as *const _, |
