MOON
Server: Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 PHP/5.4.10
System: Linux vps.presagepowered.net 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: mckernan (512)
PHP: 5.4.10
Disabled: NONE
Upload Files
File: //usr/share/doc/netpbm-10.35.58/userguide/libtmpfilefd.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html> <head>
<title>Netpbm subroutine library: pm_tmpfile_fd() function</title>
<meta name="manual_section" content="3">
</head>

<body>
<h1>pm_tmpfile_fd()</h1>
Updated: 31 December 2007
<br>

<h2>NAME</h2>

pm_tmpfile_fd() - create a temporary unnamed file

<h2>SYNOPSIS</h2>

<pre>
#include &lt;netpbm/pm.h&gt;

FILE *
pm_tmpfile_fd(void);
</pre>

<h2>EXAMPLE</h2>

<p>This simple example creates a temporary file, writes &quot;hello
world&quot; to it, then reads back and prints those contents.

<pre>
#include &lt;netpbm/pm.h&gt;

int fd;

fd = pm_tmpfile();

write(fd, &quot;hello world\n&quot;, 17);

lseek(fd, 0, SEEK_SET);

read(fd, buffer, sizeof(buffer));

fprintf(STDOUT, &quot;temp file contains '%s'\n&quot;, buffer);

close(fd);

</pre>

<h2>DESCRIPTION</H2>

<p>This library function is part of <a href="index.html">Netpbm</a>.

<p><b>pm_tmpfile_fd()</b> is analogous to <a
href="libtmpfile.html"><b>pm_tmpfile()</b></a>.  The only difference is
that it opens the file as a low level file, as <b>open()</b> would,
rather than as a stream, as <b>fopen()</b> would.

<p>If you need to refer to the temporary file by name, use
<b>pm_make_tmpfile_fd()</b> instead.

<h2>HISTORY</h2>

<p><b>pm_tmpfile()</b> was introduced in Netpbm 10.42 (March 2008).

</body>
</html>