From e8f1b18ec29d89f8f04b6e823e0dab703ff99ae5 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 7 May 2008 12:03:25 +0000 Subject: [PATCH] Clear O_EXCL, if O_CREAT is not given. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25343 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/semaphore.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/system/libroot/posix/semaphore.cpp b/src/system/libroot/posix/semaphore.cpp index 1e0830acd0..09fffca661 100644 --- a/src/system/libroot/posix/semaphore.cpp +++ b/src/system/libroot/posix/semaphore.cpp @@ -36,6 +36,9 @@ sem_open(const char* name, int openFlags,...) mode = va_arg(args, mode_t); semCount = va_arg(args, unsigned); va_end(args); + } else { + // clear O_EXCL, if O_CREAT is not given + openFlags &= ~O_EXCL; } // Allocate a sem_t structure -- we don't know, whether this is the first