Short: Replacement for WaitForPort command Author: Development@Holzammer.net (Jean Holzammer) Uploader: jholzammer bene baynet de (Jean Holzammer) Type: util/rexx Version: 1.1 Architecture: m68k-amigaos >= 2.04 ; ppc-morphos >= 0.4 Kurz: Ersatz für den WaitForPort Befehl NewWait4Port is a replacement for the WaitForPort command provided with AmigaOS. It waits for a Message Port to appear and then quits. This is useful for batch scripts. Here's an example: run <>NIL: Miami:Miami ;start Miami TCP/IP-Stack as background task NewWait4Port MIAMI.1 ;wait for its Msg port to appear rx "ADDRESS MIAMI.1 ONLINE" ;send a rexx command to this port This script waits till Miami has been started and its ARexx Port is available. Then it tells Miami to go online. Without NewWait4Port you would try to send a rexx message before the Port is available as it needs some time for Miami to start. Of course you could use a simple @{i}wait 5@{ui}. But you never really know how long Miami will need to start. Features: --------- The original WaitForPort command of AmigaOS has two major disadvantages: · it always quits if the port isn't available within 10 seconds. · it uses an endless loop of FindPort() calls resulting in a massive loss of CPU performance on slower systems. NewWait4Port waits for the Port to appear even if it has to wait for hours. It also allows you to define a delay time between FindPort() calls preventing a loss of CPU performance. Optionally you can still define a timeout if needed. Changes in 1.1: --------------- · Added TIMEOUT argument · 68K version checks for minimum OS version · Added Binary for MorphOS · Reduced number of document formats for documentation · Added German documentation · On error now returns appropriate DOS error codes. ===================================== Archive contents ======================================= Original Packed Ratio Date Time Name -------- ------- ----- --------- -------- ------------- 1144 493 56.9% 24-Feb-01 17:53:00 NewWait4Port.info 1464 1018 30.4% 01-Nov-05 21:14:38 NewWait4Port/AmigaOS_68K/Rexxc/NewWait4Port 2273 564 75.1% 14-Aug-99 14:40:42 NewWait4Port/Help.info 7649 3443 54.9% 01-Nov-05 23:30:32 NewWait4Port/Help/Deutsch/NewWait4Port.guide 1392 622 55.3% 14-Aug-99 14:38:30 NewWait4Port/Help/Deutsch/NewWait4Port.guide.info 6800 3053 55.1% 01-Nov-05 23:32:26 NewWait4Port/Help/English/NewWait4Port.guide 1392 622 55.3% 14-Aug-99 14:38:30 NewWait4Port/Help/English/NewWait4Port.guide.info 2892 1660 42.6% 01-Nov-05 21:17:32 NewWait4Port/MorphOS/Rexxc/NewWait4Port -------- ------- ----- --------- -------- 25006 11475 54.1% 01-Nov-05 23:33:18 8 files