diff options
Diffstat (limited to 'src/libnative/io/process.rs')
| -rw-r--r-- | src/libnative/io/process.rs | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/libnative/io/process.rs b/src/libnative/io/process.rs index e5165929ad3..cb392e1675f 100644 --- a/src/libnative/io/process.rs +++ b/src/libnative/io/process.rs @@ -313,7 +313,7 @@ fn spawn_process_os(cfg: ProcessConfig, if b"PATH" != key.as_bytes_no_nul() { continue } // Split the value and test each path to see if the program exists. - for path in os::split_paths(v.as_bytes_no_nul()).move_iter() { + for path in os::split_paths(v.as_bytes_no_nul()).into_iter() { let path = path.join(cfg.program.as_bytes_no_nul()) .with_extension(os::consts::EXE_EXTENSION); if path.exists() { @@ -347,7 +347,7 @@ fn spawn_process_os(cfg: ProcessConfig, let size = mem::size_of::<libc::SECURITY_ATTRIBUTES>(); let mut sa = libc::SECURITY_ATTRIBUTES { nLength: size as libc::DWORD, - lpSecurityDescriptor: ptr::mut_null(), + lpSecurityDescriptor: ptr::null_mut(), bInheritHandle: 1, }; let filename: Vec<u16> = "NUL".utf16_units().collect(); @@ -359,7 +359,7 @@ fn spawn_process_os(cfg: ProcessConfig, &mut sa, libc::OPEN_EXISTING, 0, - ptr::mut_null()); + ptr::null_mut()); if *slot == INVALID_HANDLE_VALUE { return Err(super::last_error()) } @@ -399,8 +399,8 @@ fn spawn_process_os(cfg: ProcessConfig, cmd_str = cmd_str.append_one(0); let created = CreateProcessW(ptr::null(), cmd_str.as_mut_ptr(), - ptr::mut_null(), - ptr::mut_null(), + ptr::null_mut(), + ptr::null_mut(), TRUE, flags, envp, dirp, &mut si, &mut pi); @@ -437,9 +437,9 @@ fn spawn_process_os(cfg: ProcessConfig, fn zeroed_startupinfo() -> libc::types::os::arch::extra::STARTUPINFO { libc::types::os::arch::extra::STARTUPINFO { cb: 0, - lpReserved: ptr::mut_null(), - lpDesktop: ptr::mut_null(), - lpTitle: ptr::mut_null(), + lpReserved: ptr::null_mut(), + lpDesktop: ptr::null_mut(), + lpTitle: ptr::null_mut(), dwX: 0, dwY: 0, dwXSize: 0, @@ -450,7 +450,7 @@ fn zeroed_startupinfo() -> libc::types::os::arch::extra::STARTUPINFO { dwFlags: 0, wShowWindow: 0, cbReserved2: 0, - lpReserved2: ptr::mut_null(), + lpReserved2: ptr::null_mut(), hStdInput: libc::INVALID_HANDLE_VALUE, hStdOutput: libc::INVALID_HANDLE_VALUE, hStdError: libc::INVALID_HANDLE_VALUE, @@ -460,8 +460,8 @@ fn zeroed_startupinfo() -> libc::types::os::arch::extra::STARTUPINFO { #[cfg(windows)] fn zeroed_process_information() -> libc::types::os::arch::extra::PROCESS_INFORMATION { libc::types::os::arch::extra::PROCESS_INFORMATION { - hProcess: ptr::mut_null(), - hThread: ptr::mut_null(), + hProcess: ptr::null_mut(), + hThread: ptr::null_mut(), dwProcessId: 0, dwThreadId: 0 } @@ -596,7 +596,7 @@ fn spawn_process_os(cfg: ProcessConfig, Err(..) => { Ok(SpawnProcessResult { pid: pid, - handle: ptr::mut_null() + handle: ptr::null_mut() }) } Ok(..) => fail!("short read on the cloexec pipe"), @@ -806,7 +806,7 @@ fn with_envp<T>(env: Option<&[(&CString, &CString)]>, cb: |*mut c_void| -> T) -> cb(blk.as_mut_ptr() as *mut c_void) } - _ => cb(ptr::mut_null()) + _ => cb(ptr::null_mut()) } } @@ -1050,14 +1050,14 @@ fn waitpid(pid: pid_t, deadline: u64) -> IoResult<rtio::ProcessExit> { tv = util::ms_to_timeval(ms); (&mut tv as *mut _, idx) } - None => (ptr::mut_null(), -1), + None => (ptr::null_mut(), -1), }; // Wait for something to happen c::fd_set(&mut set, input); c::fd_set(&mut set, read_fd); - match unsafe { c::select(max, &mut set, ptr::mut_null(), - ptr::mut_null(), p) } { + match unsafe { c::select(max, &mut set, ptr::null_mut(), + ptr::null_mut(), p) } { // interrupted, retry -1 if os::errno() == libc::EINTR as int => continue, @@ -1129,7 +1129,7 @@ fn waitpid(pid: pid_t, deadline: u64) -> IoResult<rtio::ProcessExit> { // Once this helper thread is done, we re-register the old sigchld // handler and close our intermediate file descriptors. unsafe { - assert_eq!(c::sigaction(c::SIGCHLD, &old, ptr::mut_null()), 0); + assert_eq!(c::sigaction(c::SIGCHLD, &old, ptr::null_mut()), 0); let _ = libc::close(read_fd); let _ = libc::close(WRITE_FD); WRITE_FD = -1; |
