TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: David Noon
from: Mike Bilow
date: 1996-04-10 17:13:48
subject: Timing out a REXX progra

David Noon wrote in a message to Mike Bilow:

MB> If the program in question was an EXE rather than a REXX 
MB> script, then I could use something like DosKillProcess().  
MB> But this does not work because simply killing the REXX 
MB> script process has the effect of killing the parent batch, 
MB> too, since CMD itself is the process.

 DN> Check out the RexxSetHalt() API.

 DN> By placing a SIGNAL ON HALT statement in your REXX exec you
 DN> should be able to shut it down fairly gracefully when the
 DN> interrupt occurs. 

As I noted in a message a few minutes ago in response to a similar
suggestion, I didn't think of this.  On the other hand, can a Rexx program
receive a "halt" signal when it its own thread of execution is in
a Rexx-callable DLL?  Now that I think more about it, I know from
experience that I can hit Ctrl-Break and that this works in the hung
condition with which I am concerned.  I think you may have given me the
answer; I'll try it.

I don't much care what the Rexx program does when it is forcibly
terminated, althouh I suppose cleaning up would be nice.  I just want it
dead.
 
-- Mike


--- 
* Origin: N1BEE BBS +1 401 944 8498 V.34/V.FC/V.32bis/HST16.8 (1:323/107)
SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 323/107 170/400 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.