From 75b992feacf4564fee79fc7229a8e6b68dab2ce8 Mon Sep 17 00:00:00 2001 From: Arcterus Date: Fri, 5 Dec 2014 16:31:48 -0800 Subject: [PATCH] nohup: fix build on Macs (closes #463) --- src/nohup/nohup.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/nohup/nohup.rs b/src/nohup/nohup.rs index d0ce46b02..f93fc44c6 100644 --- a/src/nohup/nohup.rs +++ b/src/nohup/nohup.rs @@ -33,20 +33,9 @@ extern { fn _vprocmgr_detach_from_console(flags: u32) -> *const libc::c_int; } -#[cfg(target_os = "macos")] -fn rewind_stdout(s: Fd) { - match s.seek(0, io::SeekEnd) { - Ok(_) => {} - Err(f) => crash!(1, "{}", f.detail.into_inner()) - } -} - #[cfg(any(target_os = "linux", target_os = "freebsd"))] unsafe fn _vprocmgr_detach_from_console(_: u32) -> *const libc::c_int { std::ptr::null() } -#[cfg(any(target_os = "linux", target_os = "freebsd"))] -fn rewind_stdout(_: Fd) {} - pub fn uumain(args: Vec) -> int { let program = &args[0]; @@ -108,8 +97,6 @@ fn replace_fds() { let new_stdout = find_stdout(); let fd = new_stdout.as_raw_fd(); - rewind_stdout(fd); - if unsafe { dup2(fd, 1) } != 1 { crash!(2, "Cannot replace STDOUT: {}", std::io::IoError::last_error()) }