Unix/Linux Go Back    

Unix Version 7 - man page for wait (v7 section 2)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

WAIT(2) 										  WAIT(2)

       wait - wait for process to terminate

       int *status;


       Wait  causes  its caller to delay until a signal is received or one of its child processes
       terminates.  If any child has died since the last wait, return is immediate; if there  are
       no  children,  return  is  immediate  with  the	error  bit  set (resp. with a value of -1
       returned).  The normal return yields the process ID of the terminated child.  In the  case
       of several children several wait calls are needed to learn of all the deaths.

       If  (int)status	is nonzero, the high byte of the word pointed to receives the low byte of
       the argument of exit when the child terminated.	The low  byte  receives  the  termination
       status of the process.  See signal(2) for a list of termination statuses (signals); 0 sta-
       tus indicates normal termination.  A special status  (0177)  is	returned  for  a  stopped
       process which has not terminated and can be restarted.  See ptrace(2).  If the 0200 bit of
       the termination status is set, a core image of the process was produced by the system.

       If the parent process terminates without  waiting  on  its  children,  the  initialization
       process (process ID = 1) inherits the children.

       exit(2), fork(2), signal(2)

       Returns -1 if there are no children not previously waited for.

       (wait = 7.)
       sys wait
       (process ID in r0)
       (status in r1)

       The high byte of the status is the low byte of r0 in the child at termination.

Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 03:58 PM.