diff options
| author | Ian Douglas Scott <ian@iandouglasscott.com> | 2017-07-17 18:37:54 -0700 |
|---|---|---|
| committer | Ian Douglas Scott <ian@iandouglasscott.com> | 2017-07-17 19:17:48 -0700 |
| commit | 6f80cd7bfc9b6141451a818daa4ac2fd9f4abad0 (patch) | |
| tree | 2fc84acb6f6864a444dec7881b17e4dc5828af96 /src/libstd/sys/redox/syscall | |
| parent | 2652ce6771b114189cdc1f9bd026a10af0a714e0 (diff) | |
| download | rust-6f80cd7bfc9b6141451a818daa4ac2fd9f4abad0.tar.gz rust-6f80cd7bfc9b6141451a818daa4ac2fd9f4abad0.zip | |
redox: handle multiple paths in PATH
Diffstat (limited to 'src/libstd/sys/redox/syscall')
| -rw-r--r-- | src/libstd/sys/redox/syscall/call.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/redox/syscall/call.rs b/src/libstd/sys/redox/syscall/call.rs index fadf7325d75..ec9005c2cc3 100644 --- a/src/libstd/sys/redox/syscall/call.rs +++ b/src/libstd/sys/redox/syscall/call.rs @@ -77,9 +77,9 @@ pub fn dup2(fd: usize, newfd: usize, buf: &[u8]) -> Result<usize> { } /// Replace the current process with a new executable -pub fn execve(path: &str, args: &[[usize; 2]]) -> Result<usize> { - unsafe { syscall4(SYS_EXECVE, path.as_ptr() as usize, path.len(), - args.as_ptr() as usize, args.len()) } +pub fn execve<T: AsRef<[u8]>>(path: T, args: &[[usize; 2]]) -> Result<usize> { + unsafe { syscall4(SYS_EXECVE, path.as_ref().as_ptr() as usize, + path.as_ref().len(), args.as_ptr() as usize, args.len()) } } /// Exit the current process |
