Open System Services System Calls Reference Manual (G06.27+, H06.04+)
creat(2) OSS System Calls Reference Manual
• The owner ID of the file is set to the effective user ID of the process.
• The group ID of the file is determined by the value of the S_ISGID flag in the parent
directory. If S_ISGID is set, then the group ID of the file is set to the group ID of the
parent directory; otherwise, the group ID of the file is set to the effective group ID of the
calling process. If the file is a Guardian file (that is, in the /G file system), the group ID
is set to that of the primary group of the effective user ID.
• The file permission and attribute bits are set to the value of the mode parameter, modified
as listed:
— All bits set in the process file mode creation mask are cleared.
— The set user ID attribute (S_ISUID bit) is cleared.
— The set group ID attribute (S_ISGID bit) is cleared.
If bits other than the file permission and appropriate file-type flags are set in the mode
parameter, errno is set to [EINVAL].
If the file exists and is a regular file that is successfully opened, then:
• The length of the file is truncated to 0 (zero).
• The owner and group of the file are unchanged.
• The set user ID attribute of the file mode is cleared.
The open fails if any of these conditions are true:
• The file supports enforced record locks, and another process has locked a portion of the
file.
• The file does not allow write access.
A program can request some control over when updates should be made permanent for a
regular file opened for write access.
File Type Flags
The file type flags that can be logically ORed into the value specified in the mode parameter are:
S_IFREG Regular file in the OSS file system or in /G, the Guardian file system.
S_ISVTX Sticky bit; used only for directories (cannot be used for files in /G, the Guardian
file system).
S_NONSTOP Regular file in the OSS file system protected by disk process checkpointing.
(Files in /G cannot have this flag set.) For nodes running RVUs with enhanced |
O_SYNC support, this flag is ignored.
When set, this flag indicates that return from a write operation does not occur
until both the primary and backup disk processes have the data (thereby protect-
ing the data against a single point of failure).
1−32 Hewlett-Packard Company 527186-004