466
|
1 <refentry id="mktemp">
|
|
2 <refnamediv>
|
570
|
3 <refname>Mktemp</refname>
|
|
4 <refpurpose>create unique temporary file name</refpurpose>
|
466
|
5 </refnamediv>
|
|
6
|
|
7 <refsynopsisdiv>
|
|
8 <funcsynopsis>
|
|
9 <funcprototype>
|
570
|
10 <funcdef>char *<function>mktemp</function></funcdef>
|
|
11 <paramdef>char *<parameter>name</parameter></paramdef>
|
466
|
12 </funcprototype>
|
|
13 </funcsynopsis>
|
|
14
|
|
15 </refsynopsisdiv>
|
|
16
|
|
17 <refsect1><title>Description</title>
|
|
18 <para>
|
602
|
19 Mktemp may be used to ensure that the name of a temporary file
|
|
20 is unique in the system and does not clash with any other file
|
|
21 name.
|
|
22 </para>
|
|
23 <para>
|
|
24 "Name" must point to a string whose last five characters are "X";
|
|
25 the Xs will be replaced with the ascii representation of
|
|
26 the task id.
|
|
27 </para>
|
|
28 <para>
|
|
29 For example, if "name" points to "foo.XXXXX", and the task id
|
|
30 is 351, the returned value points at the same place, but it
|
|
31 now holds "foo.351".
|
466
|
32 </para>
|
|
33 </refsect1>
|
542
|
34
|
|
35 <refsect1><title>See Also</title>
|
|
36 <para>
|
|
37 System call
|
|
38 <link linkend="getpid">getpid()</link>
|
|
39 </para>
|
|
40 </refsect1>
|
|
41
|
466
|
42 </refentry>
|