| | 646 | {{{ |
| | 647 | $system void $wait($proc p); |
| | 648 | $system void $waitall($proc *procs, int numProcs); |
| | 649 | }}} |
| | 650 | |
| | 651 | Calling `$wait(p)` blocks the calling process until process `p` has terminated. |
| | 652 | Calling `$waitall(procs, n)` blocks the calling process until all processes `procs[0]`,...,`procs[n-1]` have terminated. |
| | 653 | All the process arguments must refer to valid processes, i.e., they cannot be undefined or `$proc_null`. |
| | 654 | It is OK if a process argument refers to a process that has already terminated. |
| | 655 | |