| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Timing out a REXX program |
Hello Mike.
07 Apr 96 16:03, Mike Bilow wrote to Phil Crown:
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.
Ugh...I'm using this and haven't encountered the problem yet.
MB> Again, if you issue a DosKillProcess() against the Rexx program, you
MB> actually kill CMD.EXE. If there is a parent batch which calls the
MB> Rexx program, then this kills the parent batch also. I suppose I can
MB> get around this by running a second copy of CMD.EXE or something, but
MB> this is not the key problem.
"START CHILD" will get you your second copy, but killing
CHILD.CMD's PID will get you a CMD.EXE with the same PID, requiring an
additional kill. "START /C" will give you a secondary CMD.EXE
that dies accordingly when CHILD.CMD's PID is killed. At least that's
what's been required here when using PROCMAN (PM interactive) and KILLPID
(commandline batch).
If you'd rather write a DLL, you might be interested in a peek this DLL
distributed in FWREXX as RXSET211.*:
=== Cut ===
RxFnSet v.2.11 REXX OS/2 FH TASK PROCESS FS
This is OS/2 Rexx callable 32 bit DLL with
functions to manage processes (list, kill),
number of file handles, switch list, query
file system type, mask/convert text with the
wildcard.
Author: Leshek Fiedorowicz Dec.3 1995
74170.2007{at}compuserve.com or point your WWW
browser for the latest version to http://
ourworld.compuserve.com/homepages/leshek/
=== Cut ===
As for the timer idea, it seems you'd be more interested in whether or not
any FTP-type activity is actually going on, rather than whether or not x
amount of real time has passed. The way the bandwidth over the Internet
varies, it would seem that your timeout could be exceeded even while
meaningful work is still being accomplished by the FTP API code, even
though it isn't hung. You may want to explore the Rexx Sockets API to see
if you can monitor the FTP socket for some meaningful sign of healthy
activity.
.\\ike
--- GoldED/2 2.50 UNREG
* Origin: -=[ TechKnowledgy at Work ]=- (1:382/61.1)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: 382/61 92 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™.