|
|
От: |
fAX
|
|
| Дата: | 28.08.03 22:35 | ||
| Оценка: | |||
MKSTEMP(3) Linux Programmer's Manual MKSTEMP(3)
NAME
mkstemp — create a unique temporary file
SYNOPSIS
#include <stdlib.h>
int mkstemp(char *template);
DESCRIPTION
The mkstemp() function generates a unique temporary file name from template. The last six characters of
template must be XXXXXX and these are replaced with a string that makes the filename unique. The file is
then created with mode read/write and permissions 0666 (glibc 2.0.6 and earlier), 0600 (glibc 2.0.7 and
later). Since it will be modified, template must not be a string constant, but should be declared as a
character array. The file is opened with the O_EXCL flag, guaranteeing that when mkstemp returns suc-
cessfully we are the only user.