Wait wait for task termination wait int *status wait 0 Assembler Equivalent os9 F$WAIT Description Wait is used to halt the current task until a child task has terminated. The call returns the task id of the terminating task and places the status of that task in the integer pointed to by "status" unless "status" is 0. A wait must be executed for each child task spawned. The status will contain the argument of the "exit" or "_exit" call in the child task of the signal number if it was interrupted. A normally terminating C program with no call to "exit" or "_exit" has an implied call of "exit(0)". Caveats NOTE that the status is the OS-9 status code and is not compatible with codes on other systems. Diagnostics -1 is returned if there is no child to be waited for. See Also os9fork(), signal(), exit(),_exit()