home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR24 / BASH_112.ZIP / BASH-112.TAR / bash-1.12 / filecntl.h < prev    next >
C/C++ Source or Header  |  1991-07-07  |  468b  |  19 lines

  1. /* filecntl.h - Definitions to set file descriptors to close-on-exec. */
  2.  
  3. #if !defined (_FILECNTL_H_)
  4. #define _FILECNTL_H_
  5.  
  6. #include <fcntl.h>
  7.  
  8. /* Definitions to set file descriptors to close-on-exec, the Posix way. */
  9. #if !defined (FD_CLOEXEC)
  10. #define FD_CLOEXEC     1
  11. #endif
  12.  
  13. #define FD_NCLOEXEC    0
  14.  
  15. #define SET_CLOSE_ON_EXEC(fd)  (fcntl ((fd), F_SETFD, FD_CLOEXEC))
  16. #define SET_OPEN_ON_EXEC(fd)   (fcntl ((fd), F_SETFD, FD_NCLOEXEC))
  17.  
  18. #endif /* ! _FILECNTL_H_ */
  19.