mktemp

Description

The mktemp() function returns a file name that is guaranteed to be unique on the Policy Server host.

Not supported in Endpoint Privilege Management for Linux (EPM-L).

Syntax

result = mktemp (template);

Arguments

template Required. Character string that contains a file name template. Within template, characters forming a unique identifier replace six trailing X characters. Many, but not all, user systems require precisely six X characters, which must be the trailing characters. Five X character ss, or X character ss in the middle of a template, might work on some systems, but this behavior is not guaranteed

Return Values

result contains the generated file name. If a unique file name cannot be generated from template, result contains a blank character string ("").

Example

In the example,

result = mktemp ("/var/adm/iologXXXXXX");

result contains the file name /var/adm/iolog.XXXXXX, where XXXXXX is replaced by a unique identifier that is generated by the operating system.

In order to have an I/O log created in this manner, the iolog variable must be set to the result of logmktemp(). For example:
iolog = logmktemp("/var/adm/iolog.XXXXXX");

See Also

logmktemp(), stat()