summaryrefslogtreecommitdiff
path: root/src/unistd.rs
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2015-06-23 17:32:39 -0700
committerCarl Lerche <me@carllerche.com>2015-06-24 10:56:29 -0700
commite462c57289fde6bdab12213b8854dc9b08b6e7d4 (patch)
tree159c3d928c72ab5c34c82869fe9f3adff9d800bb /src/unistd.rs
parentaa0863b0b9b31630159b5a36db694b43b3500bdc (diff)
downloadnix-e462c57289fde6bdab12213b8854dc9b08b6e7d4.zip
Implement more fcntl operations
Derive some more traits on flock to make life easier Change fcntl to return Result<c_int> so we can get results of F_GET* ops. Change pipe2_setflags to match.
Diffstat (limited to 'src/unistd.rs')
-rw-r--r--src/unistd.rs2
1 files changed, 1 insertions, 1 deletions
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