Shell Commands/WaitForPort
From MorphOS Library
WaitForPort - Waits 10 secs for port to appear
PORTNAME/A, I=INTERVAL/K/N, L=LOOP/K/N, D=DISAPPEAR/S
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.
Example:
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.