David,
The change to SysOpenEventSem is NOT correct. The value being returned is
not an object pointer. This will result in a crash the first time the
garbage collector runs. The original return type is correct, the only
change should be which pointer value is getting returned.
Rick
---------- Forwarded message ----------
From: <wdash...@users.sf.net>
Date: Fri, Oct 26, 2012 at 10:59 AM
Subject: [Oorexx-svn] SF.net SVN: oorexx-code-0:[8537]
main/trunk/extensions/rexxutil/platform/ unix/rexxutil.cpp
To: oorexx-...@lists.sourceforge.net
Revision: 8537
http://sourceforge.net/p/oorexx/code-0/8537
Author: wdashley
Date: 2012-10-26 14:59:37 +0000 (Fri, 26 Oct 2012)
Log Message:
-----------
Fix for bug 1137.
Modified Paths:
--------------
main/trunk/extensions/rexxutil/platform/unix/rexxutil.cpp
Modified: main/trunk/extensions/rexxutil/platform/unix/rexxutil.cpp
===================================================================
--- main/trunk/extensions/rexxutil/platform/unix/rexxutil.cpp 2012-10-25
14:04:42 UTC (rev 8536)
+++ main/trunk/extensions/rexxutil/platform/unix/rexxutil.cpp 2012-10-26
14:59:37 UTC (rev 8537)
@@ -1919,7 +1919,6 @@
}
else {
/* this is a named semaphore */
- sem_unlink(name);
semdata->handle = sem_open(name, (O_CREAT | O_EXCL), (S_IRWXU |
S_IRWXG), 0);
if (semdata->handle == SEM_FAILED ) {
free(semdata);
@@ -1941,7 +1940,7 @@
* Return: result - return code from DosOpenEventSem *
*************************************************************************/
-RexxMethod1(uintptr_t, SysOpenEventSem, CSTRING, name)
+RexxMethod1(RexxObjectPtr, SysOpenEventSem, CSTRING, name)
{
RXSEMDATA *semdata;
@@ -1954,7 +1953,7 @@
return 0;
}
semdata->named = true;
- return (uintptr_t)semdata->handle;
+ return (RexxObjectPtr)semdata;
}
@@ -2122,7 +2121,6 @@
}
else {
/* this is a named semaphore */
- sem_unlink(name);
semdata->handle = sem_open(name, (O_CREAT | O_EXCL), (S_IRWXU |
S_IRWXG), 0);
if (semdata->handle == SEM_FAILED ) {
free(semdata);
@@ -2145,7 +2143,7 @@
* Return: result - return code from DosOpenEventSem *
*************************************************************************/
-RexxRoutine1(uintptr_t, SysOpenMutexSem, CSTRING, name)
+RexxRoutine1(RexxObjectPtr, SysOpenMutexSem, CSTRING, name)
{
RXSEMDATA *semdata;
@@ -2158,7 +2156,7 @@
return 0;
}
semdata->named = true;
- return (uintptr_t)semdata->handle;
+ return (RexxObjectPtr)semdata;
}
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Oorexx-svn mailing list
oorexx-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-svn
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel