Menu

#1137 Rexxutil Semaphore Create and Open Bugs

v4.2.0
closed
None
none
1
2014-04-15
2012-10-26
No

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 documentation for the SysCreateMutexSem and SysCreateEventSem functions should be modified to remove the references to the corresponding Open functions since the Open functions will only accept a semaphore name and not a handle.

The text should also be modified to indicate that the function will fail if you attempt to create a named semaphore that already exists.

Discussion

  • David Ashley

    David Ashley - 2012-10-26
    • status: open --> pending
     
  • David Ashley

    David Ashley - 2012-10-26

    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.

     
  • Rick McGuire

    Rick McGuire - 2014-04-15
    • status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel