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
This commit is contained in:
Marcus Overhagen 2007-08-05 13:56:01 +00:00
parent 43fdea7d52
commit d1dc70fa5f

View File

@ -4206,7 +4206,7 @@ common_fcntl(int fd, int op, uint32 argument, bool kernel)
// O_CLOEXEC is the only flag available at this time // O_CLOEXEC is the only flag available at this time
mutex_lock(&context->io_mutex); 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); mutex_unlock(&context->io_mutex);
status = B_OK; status = B_OK;