diff options
author | davidxu <davidxu@FreeBSD.org> | 2010-01-07 04:15:49 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2010-01-07 04:15:49 +0000 |
commit | d206161359d96c0b5fb300d4243de94c7c0780eb (patch) | |
tree | d58026e71ef9584da7db5a53883880b547ea3279 /tools/regression | |
parent | be64a18fd40f19e9ee4ce795336fefb0c9996d1d (diff) | |
download | FreeBSD-src-d206161359d96c0b5fb300d4243de94c7c0780eb.zip FreeBSD-src-d206161359d96c0b5fb300d4243de94c7c0780eb.tar.gz |
Don't forget to use fourth argument if O_CREAT is set in argument oflag.
The fourth specifies initial value for the semaphore.
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/posixsem2/semtest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/regression/posixsem2/semtest.c b/tools/regression/posixsem2/semtest.c index 7557a61..befc7c5 100644 --- a/tools/regression/posixsem2/semtest.c +++ b/tools/regression/posixsem2/semtest.c @@ -58,10 +58,10 @@ test_named(void) printf("testing named process-shared semaphore\n"); sem_unlink(SEM_NAME); - s = sem_open(SEM_NAME, O_CREAT, 0777); + s = sem_open(SEM_NAME, O_CREAT, 0777, 0); if (s == SEM_FAILED) err(1, "sem_open failed"); - s2 = sem_open(SEM_NAME, O_CREAT, 0777); + s2 = sem_open(SEM_NAME, O_CREAT, 0777, 0); if (s2 == SEM_FAILED) err(2, "second sem_open call failed"); if (s != s2) |