    Wait for process completion and return exit status.
    
    Waits for the specified process and reports its termination status.  If
    PID is not given, all currently active child processes are waited for,
    and the return code is zero.  PID must be a process ID.
    
    Exit Status:
    Returns the status of ID; fails if ID is invalid or an invalid option is
    given.
