Query: libmaketmpfilefd
OS: centos
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Netpbm subroutine library: pm_make_tmpfile_fd() function(3) Library Functions Manual Netpbm subroutine library: pm_make_tmpfile_fd() function(3)NAMEpm_make_tmpfile_fd() - create a temporary named fileSYNOPSIS#include <netpbm/pm.h> pm_make_tmpfile(int * fdP, const char ** filenameP);EXAMPLEThis simple example creates a temporary file, writes 'hello world' to it, then writes some search patterns to it, then uses it as input to grep: #include <netpbm/pm.h> int fd; const char * myfilename; pm_make_tmpfile_fd(&fdP, &myfilename); write(fd, '^account:\s.* ', 16); fprintf(fd, '^name:\s.* ', 13); close(fd); asprintfN(&grepCommand, 'grep --file='%s' /tmp/infile >/tmp/outfile'); system(grepCommand); strfree(grepCommand); unlink(myfilename); strfree(myfilename);DESCRIPTIONThis library function is part of Netpbm(1) pm_make_tmpfile_fd() is analogous to pm_make_tmpfile()(1) difference is that it opens the file as a low level file, as open() would, rather than as a stream, as fopen() would. If you don't need to access the file by name, use pm_tmpfile_fd() instead, because it's cleaner. With pm_tmpfile_fd(), the operating sys- tem always deletes the temporary file when your program exits, if the program failed to clean up after itself.HISTORYpm_tmpfile() was introduced in Netpbm 10.42 (March 2008). netpbm documentation 31 December 2007 Netpbm subroutine library: pm_make_tmpfile_fd() function(3)
Related Man Pages |
---|
pnm(5) - centos |
libtmpfile(3) - centos |
libmaketmpfilefd(3) - suse |
libnetpbm(3) - suse |
libnetpbm(3) - php |
Similar Topics in the Unix Linux Community |
---|
imagelink 3.20080123 (Default branch) |
imagelink 3.20080402 (Default branch) |
USN-665-1: Netpbm vulnerability |
variable assignment using awk |
USN-934-1: Netpbm vulnerability |