| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Timing out a REXX program |
In a message to Phil Crown Mike Bilow wrote:
PC> How about using a timer in the REXX script itself?
PC> call time('e') /* start the timer */
PC> call time('r') /* returns elapsed secs since time('e') */
PC> if result > MAXTIMEALLOWED then ...
MB> This will not achieve what I want. The goal is to time out a Rexx
MB> function call -- in the RXFTP library, as it happens -- if it takes
MB> too long. The idea is that I am starting an FTP session and do not
MB> want to hang forever if the FTP server goes away unilaterally.
MB> Ideally, the RXFTP library would have the necessary timeout facility
MB> built into it, but it doesn't. I am willing to have the whole Rexx
MB> program die if a timeout expires; I just want to guarantee that the
MB> Rexx program terminates somehow within a specified worst case
MB> maximum amount of time. If the Rexx program is still running well
MB> enough to make calls to the time() function, then I don't need to
MB> kill it.
Why not launch a separate process for your function and leave the mail
program waiting.. if the function ends normally, the process signals the
program to continue; if it times out, the main program closes in fail mode.
Cheers,
Rich
http://www.netside.net/~rveraa/
* Origin: the birds of the air come and lodge (1:135/907)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: 135/907 71 292 992 3615/50 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™.