Skip to content

Commit 9440f8e

Browse files
committed
libcore: Implement a dup2
1 parent 8b8e0c2 commit 9440f8e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libcore/os.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,10 @@ fn pipe() -> {in: c_int, out: c_int} {
357357
return {in: fds.in, out: fds.out};
358358
}
359359

360+
fn dup2(src: c_int, dst: c_int) -> c_int {
361+
libc::dup2(src, dst)
362+
}
363+
360364

361365
fn dll_filename(base: ~str) -> ~str {
362366
return pre() + base + dll_suffix();

0 commit comments

Comments
 (0)