|
|
1.1 root 1: .TH MKTEMP 3
2: .CT 2 file_inq_creat
3: .SH NAME
4: mktemp, tmpnam \(mi make a unique file name
5: .SH SYNOPSIS
6: .nf
7: .B char *mktemp(template)
8: .B char *template;
9: .PP
10: .B #include <tmpnam.h>
11: .PP
12: .B char *tmpnam(s)
13: .B char s[L_tmpnam];
14: .fi
15: .SH DESCRIPTION
16: .I Mktemp
17: replaces
18: .I template
19: by a unique file name, and returns the
20: address of the template.
21: The template should look like a file name with six trailing
22: .LR X s,
23: which will be replaced with the
24: current process id and a unique letter.
25: .PP
26: .I Tmpnam
27: places in the string pointed to by
28: .I s
29: a unique file name referring to the standard
30: .F /tmp
31: directory for temporary files and returns
32: .I s.
33: If
34: .I s
35: is 0,
36: .I tmpnam
37: returns the address of a fixed internal buffer that contains the name.
38: (Note: it is bad form to leave files in the temporary directory.)
39: .SH "SEE ALSO"
40: .IR getpid " in"
41: .IR getuid (2)
42: .SH BUGS
43: After many calls to
44: .IR tmpnam ,
45: the resulting filenames may have strange characters.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.