Shell Commands/WaitForPort

From MorphOS Library

Revision as of 07:27, 12 October 2016 by JPV (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

< Shell Commands

WaitForPort - Waits 10 secs for port to appear


PORTNAME  - Name of the port to wait for                                       
INTERVAL  - Only checks for the port every INTERVAL seconds (Default=1)
LOOP      - Number of time to loop (Default=10)
DISAPPEAR - Check for the port to disappear instead of appear

WaitForPort waits (10 seconds by default) for the specified port to appear. A return code of 0 indicates that the port was found. A return code of 5 indicates that the application is not currently running or that the port does not exist.


  MorphOS:> WaitForPort INTERVAL=1 LOOP=5 MIAMI.1
=> Waits 1 second and check for the presence of the 'MIAMI.1' port. Do that 5 times.

NOTE: Port names are case sensitive.