From e462c57289fde6bdab12213b8854dc9b08b6e7d4 Mon Sep 17 00:00:00 2001 From: Andy Grover Date: Tue, 23 Jun 2015 17:32:39 -0700 Subject: Implement more fcntl operations Derive some more traits on flock to make life easier Change fcntl to return Result so we can get results of F_GET* ops. Change pipe2_setflags to match. --- src/unistd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/unistd.rs') diff --git a/src/unistd.rs b/src/unistd.rs index 93214a25..eb263d85 100644 --- a/src/unistd.rs +++ b/src/unistd.rs @@ -254,7 +254,7 @@ pub fn pipe2(flags: OFlag) -> Result<(RawFd, RawFd)> { } fn pipe2_setflags(fd1: RawFd, fd2: RawFd, flags: OFlag) -> Result<()> { - let mut res = Ok(()); + let mut res = Ok(0); if flags.contains(O_CLOEXEC) { res = res -- cgit v1.2.3