/* * set close on exec (on Unix) */ #include #include void fclsexec(fp) FILE *fp; { (void) ioctl(fileno(fp), FIOCLEX, (struct sgttyb *)NULL); }