[pmmail-list] rexx exits on OS/2

Dave Saville pmmail-list@blueprintsoftwareworks.com
Mon, 08 Jul 2002 08:11:45 +0100 (BST)


I just had an exchange on the comp.os.os2.misc news group. Can anyone
confirm that PMMail can cause a similar problem. I use an object rexx
script against all incoming mail........


On Sun, 7 Jul 2002 13:14:54 UTC, "Dave Saville"
<dave.nospam@ntlworld.com> wrote:

>On 6 Jul 2002 20:56:31 GMT, Jack Troughton wrote:
>
>>On Fri, 5 Jul 2002 10:52:07 UTC, "Dave Saville" <dave.nospam@ntlworld.=
com> wrote:

<snip>

>>>It blew with a stack overflow. I then tried just pstat >result.
>>>Same thing, looking at the o/p in an editor it seems to me that
>>>there are one hell of a lot of semaphores.  On a freshly booted
>>>system I get:

<snip>

>>>But on this one that had been up for about twelve hours it went
>>>on and on up to 
>>>
>>>                   0E**      01         01     0051
>>>
>>>When it crapped out.
>>
>>Are you running object rexx? Do you have any daemon programs that
>>can be scripted with rexx?
>
>Yes to the first. Not sure to the second - can you give an example
>please?

The one I had the problem with was SafeFire.

The issue revolves around the use of REXXSTART to start rexx
procedures from a C proigram. What happens with classic REXX is that
the calling process (safefire, whatever) will allocate four
semaphores for the script, and then close them when the script
terminates.

However, this doesn't work the same in Object REXX. Since one can
start a new thread from an Object REXX program, the REXXSTART call
leaves the semaphores open. Those semaphores must be explicitly
closed, instead of closing automatically.

In the Object REXX for Windows docs, they talk about two new APIs;
RexxDidRexxTerminate and RexxWaitForTermination. Apparently, you can
use them to check if all activities (including threads) have been
closed (*didrexxterminate) and then close the resources
(*waitfortermination). I've been poking through the various libs and
headers in the toolkit, but have not found those APIs in the OS/2
version of Object REXX... it's possible they were added after IBM
put Object REXX/2 into maintenance mode or something, or perhaps
they have different names. I saw one that looked interesting
(RexxExitQuery) but haven't really had time to check them out... I
need to learn how to write in C first:)

<snip>

-- 
-------------------------------------------------------------------
* Jack Troughton                            jake at consultron.ca *
* http://consultron.ca                         irc.ecomstation.ca *
* Laval Qu=E9bec Canada                   news://news.consultron.ca *
-------------------------------------------------------------------



--
Regards

Dave Saville
Please note new email address dave.saville@ntlworld.com

- pmmail-list - The PMMail Dicussion List ---------------------------
To POST to the list, send your message to:
pmmail-list@blueprintsoftwareworks.com

To UNSUBSCRIBE, send a message to mdaemon@bmtmicro.com with the first 
line of the message body being...
UNSUBSCRIBE pmmail-list@blueprintsoftwareworks.com
---------------------------------------------------------------------