mk90.commands
Command wait
Wait for one allocated background slot to finish.
Synopsis
wait pidOrdinary invocation: foreground child, PID 3; the shell waits. Not an allowed pipe producer.
Parameters
| Parameter | Meaning |
|---|---|
pid | 1 or 2, including a slot already in DONE or FAULT state. |
Description
Allows the scheduler to run until the target is DONE or FAULT, then prints its recorded exit code. The WAIT command itself returns success after printing that code.
SU, then C cancels this wait without killing the target. A cancelled wait does not print a final target code.
Examples
run count 3
wait 1
psLimits and side effects
- Cannot wait for an arbitrary PID or collect several jobs at once. The result belongs to the current occupant of the slot. BASIC WAIT has a different meaning and uses ticks.
Status and diagnostics
Success is status 0. Relevant status codes: 8. See the diagnostic reference.
See also
run · kill · sleep · Shell syntax