Skip to content

Commit 027e6a1

Browse files
committed
Temporarily remove dup3 support
1 parent 02bc079 commit 027e6a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/unistd.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ mod ffi {
1616
// doc: http://man7.org/linux/man-pages/man2/dup.2.html
1717
pub fn dup(oldfd: c_int) -> c_int;
1818
pub fn dup2(oldfd: c_int, newfd: c_int) -> c_int;
19-
pub fn dup3(oldfd: c_int, newfd: c_int, flags: c_int) -> c_int;
19+
20+
// TODO: dup3 is only available in newer linux kernels and possibly a few *bsds
21+
// pub fn dup3(oldfd: c_int, newfd: c_int, flags: c_int) -> c_int;
2022

2123
// change working directory
2224
// doc: http://man7.org/linux/man-pages/man2/chdir.2.html
@@ -62,6 +64,8 @@ pub fn dup2(oldfd: Fd, newfd: Fd) -> SysResult<Fd> {
6264
Ok(res)
6365
}
6466

67+
/*
68+
Same TODO as above
6569
#[inline]
6670
pub fn dup3(oldfd: Fd, newfd: Fd, flags: OFlag) -> SysResult<Fd> {
6771
let res = unsafe { ffi::dup3(oldfd, newfd, flags.bits()) };
@@ -72,6 +76,7 @@ pub fn dup3(oldfd: Fd, newfd: Fd, flags: OFlag) -> SysResult<Fd> {
7276
7377
Ok(res)
7478
}
79+
*/
7580

7681
#[inline]
7782
pub fn chdir<S: ToCStr>(path: S) -> SysResult<()> {

0 commit comments

Comments
 (0)