Shell Commands/WaitForPort

From MorphOS Library

Revision as of 14:44, 3 March 2015 by JPV (talk | contribs) (Created page with "'''WaitForPort''' - Waits 10 secs for port to appear PORTNAME/A, I=INTERVAL/K/N, L=LOOP/K/N, D=DISAPPEAR/S <nowiki> PORTNAME - Name of the port to wait for...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

< Shell Commands

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
LOOP      - Number of time to loop (Default=1)
DISAPPEAR - Check for the port to disappear instead of appear

WaitForPort waits 10 seconds 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.