home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / posix / sys / wait / wait.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  1.4 KB  |  53 lines

  1. @node wait, process
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <sys/wait.h>
  6.  
  7. pid_t pid = wait(int *status);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function causes its caller to delay its execution until a signal
  13. is received or one of its child processes terminates.  If any child has
  14. terminated, return is immediate, returning the process ID and its exit
  15. status, if that's available.  If no children processes were called since
  16. the last call, then -1 is returned and @code{errno} is set.
  17.  
  18. @subheading Return Value
  19.  
  20. If successful, this function returns the exit status of the child.  If
  21. there is an error, these functions return -1 and set @code{errno} to
  22. indicate the error type.
  23.  
  24. @subheading Bugs
  25.  
  26. Currently, this function always fails.
  27.  
  28. @c -----------------------------------------------------------------------
  29. @node waitpid, process
  30. @subheading Syntax
  31.  
  32. @example
  33. #include <sys/wait.h>
  34.  
  35. pid_t pid = waitpid((pid_t pid, int *status, int options);
  36. @end example
  37.  
  38. @subheading Description
  39.  
  40. Currently, this function always fails. A -1 is returned and @code{errno}
  41. is set to indicate there are no children.
  42.  
  43. @subheading Return Value
  44.  
  45. If successful, this function returns the exit status of the child.  If
  46. there is an error, these functions return -1 and set @code{errno} to
  47. indicate the error type.
  48.  
  49. @subheading Bugs
  50.  
  51. Currently, this function always fails.
  52.  
  53.