[Info-vax] Problem with sem_open() call

Alexander Saprykin xelfium at gmail.com
Mon Sep 19 09:19:06 EDT 2016


I'm trying to use POSIX semaphores introduced in OpenVMS 8.4, but with no luck.

1. Calling sem_open("/myname", O_CREAT | O_EXCL, 0660, 1) returns a pointer to a semaphore structure (sem_t), no problems here.
2. Calling the same routine returns EEXIST on the second time, as described in manual (so, the semaphore already exists), no problems here.
3. But subsequent sem_open("/myname", 0) call fails with ENOENT error code which means that there is no semaphore with such a name. But semaphore actually exists, because even sem_unlink ("/myname") returns 0.

So I couldn't open semaphore after its creation.

Has some faced with such a problem? Maybe I need to make some system configuration changes?

Best Regards,
Alexander Saprykin



More information about the Info-vax mailing list