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

  1. @node exec*, process
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <unistd.h>
  6.  
  7. int execl(const char *path, const char *argv0, ...);
  8. int execle(const char *path, const char *argv0, ... /*, char *const envp[] */);
  9. int execlp(const char *path, const char *argv0, ...);
  10. int execlpe(const char *path, const char *argv0, ... /*, char *const envp[] */);
  11.  
  12. int execv(const char *path, char *const argv[]);
  13. int execve(const char *path, char *const argv[], char *const envp[]);
  14. int execvp(const char *path, char *const argv[]);
  15. int execvpe(const char *path, char *const argv[], char *const envp[]);
  16. @end example
  17.  
  18. @subheading Description
  19.  
  20. These functions operate by calling @code{spawn*} with a type of
  21. @code{P_OVERLAY}.  Refer to @ref{spawn*} for a full description. 
  22.  
  23. @subheading Return Value
  24.  
  25. If successful, these functions do not return.  If there is an error,
  26. these functions return -1 and set @code{errno} to indicate the error. 
  27.  
  28. @subheading Example
  29.  
  30. @example
  31. execlp("gcc", "gcc", "-v", "hello.c", 0);
  32. @end example
  33.  
  34.