Version: All versions of ooRexx
Op Sys: Windows and *nix
SysCreateMutexSem and SysCreateEventSem (unix versions) have a call to sem_unlink prior to creating the semaphore. This is a bug that will cause a new semaphore to be created every time the function is called. This statement should be removed so that the function fails if the semaphore exists.
The last statement in the SysOpenMutexSem and SysOpenEventSem (unix and windows versions) should be changed from
return (uintptr_t)semdata->handle;
to
return (uintptr_t)semdata;
The prototype for the function will also need modification.
The text should also be modified to indicate that the function will fail if you attempt to create a named semaphore that already exists.
Anonymous
Fixed. It turns out the Windows versions of the functions were okay and no changes were needed. The docs had already removed references to the open functions but modifications were necessary to indicate the create functions would fail if the semaphore already exists.