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
This commit is contained in:
Ingo Weinhold 2008-05-07 12:03:25 +00:00
parent e4019ca48a
commit e8f1b18ec2
1 changed files with 3 additions and 0 deletions

View File

@ -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