[Info-vax] Problem with sem_open() call
John Reagan
xyzzy1959 at gmail.com
Wed Sep 21 13:56:14 EDT 2016
On Wednesday, September 21, 2016 at 1:48:23 PM UTC-4, Stephen Hoffman wrote:
> On 2016-09-21 17:20:51 +0000, Alexander Saprykin said:
>
> > Are here in the group any developers from the VMS Software to check it
> > in the VMS source? I don't know whom to contact to clarify this issue.
> > I still unsure if it is a bug or not, maybe underlying (I guess)
> > Distributed Lock Manager need to be configured or something else.
>
> Folks from VSI do follow this newsgroup. They will probably see this
> thread. As for HPE, you'd have to have somebody with a support
> contract log a call. Same path (officially) for reporting bugs and
> requesting fixes from VSI, too.
>
> > I mean it is a primary use case of the POSIX named semaphores, I do not
> > believe they released a new API without testing it. If it is a bug, it
> > can affect lot of other software which can be potentially ported on
> > OpenVMS.
>
> I don't see an error in your code, and I do see the misbehavior, and
> that's with fairly recent OpenVMS Alpha running on a supported Alpha
> box. Which usually means there's a bug in the code, and a gap in the
> testing. OpenVMS has had its share of bugs over the years, as have
> other platforms.
>
I hadn't used these before... and I must be doing something wrong... What file isn't being found?
$ type sem_create.c
#include <semaphore.h>
#include <stdio.h>
#include <errno.h>
int main ()
{
sem_t * my_semaphore;
my_semaphore = sem_open ("/mysemaphore", O_CREAT | O_EXCL, 0660, 0);
if (my_semaphore == SEM_FAILED) {
if (errno == EEXIST)
printf ("[OK] Semaphore exists\n");
else if (errno == EVMSERR)
printf ("[FAIL] VMS Error code: %d\n", vaxc$errno);
else
printf ("[FAIL] Error code: %d\n", errno);
} else
printf ("[OK] Semaphore created\n");
return 0;
}
$ r sem_create
[FAIL] VMS Error code: 98962
$ exit 98962
%RMS-E-FNF, file not found
More information about the Info-vax
mailing list