summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/thread/sem_open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/sem_open.c b/src/thread/sem_open.c
index 0361a769..2e900eb3 100644
--- a/src/thread/sem_open.c
+++ b/src/thread/sem_open.c
@@ -71,7 +71,7 @@ sem_t *sem_open(const char *name, int flags, ...)
errno = EINVAL;
return SEM_FAILED;
}
- sem_init(&newsem, 0, value);
+ sem_init(&newsem, 1, value);
clock_gettime(CLOCK_REALTIME, &ts);
snprintf(tmp, sizeof(tmp), "/dev/shm/%p-%p-%d-%d",
&name, name, (int)getpid(), (int)ts.tv_nsec);