From 9440f8e9b86de3c6166a875b8aee29448580e7ea Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 21 Aug 2012 16:00:14 -0700 Subject: [PATCH] libcore: Implement a dup2 --- src/libcore/os.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libcore/os.rs b/src/libcore/os.rs index be50c71697f..1ce95753497 100644 --- a/src/libcore/os.rs +++ b/src/libcore/os.rs @@ -357,6 +357,10 @@ fn pipe() -> {in: c_int, out: c_int} { return {in: fds.in, out: fds.out}; } +fn dup2(src: c_int, dst: c_int) -> c_int { + libc::dup2(src, dst) +} + fn dll_filename(base: ~str) -> ~str { return pre() + base + dll_suffix();