Name

ap_popenf — open a file with automatic cleanup

Synopsis

int ap_popenf(pool *p, const char *name, int flg, int mode)

The equivalent to the standard C-function open(), except that it ensures that the file is closed when the pool is destroyed. Returns the file descriptor for the opened file or -1 on error.