From d1dc70fa5fd827aa28c7bf03b5ca8014676bd365 Mon Sep 17 00:00:00 2001 From: Marcus Overhagen Date: Sun, 5 Aug 2007 13:56:01 +0000 Subject: [PATCH] FD_CLOEXEC is a flag, other bits may be set git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21829 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/fs/vfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp index 33ddc92438..6c6f7f8613 100644 --- a/src/system/kernel/fs/vfs.cpp +++ b/src/system/kernel/fs/vfs.cpp @@ -4206,7 +4206,7 @@ common_fcntl(int fd, int op, uint32 argument, bool kernel) // O_CLOEXEC is the only flag available at this time mutex_lock(&context->io_mutex); - fd_set_close_on_exec(context, fd, argument == FD_CLOEXEC); + fd_set_close_on_exec(context, fd, argument & FD_CLOEXEC); mutex_unlock(&context->io_mutex); status = B_OK;