Open System Services System Calls Reference Manual (G06.25+, H06.03+)

creat(2) OSS System Calls Reference Manual
The owner ID of the le is set to the effective user ID of the process.
The group ID of the le is determined by the value of the S_ISGID ag in the parent
directory. If S_ISGID is set, then the group ID of the le is set to the group ID of the
parent directory; otherwise, the group ID of the le is set to the effective group ID of the
calling process. If the le is a Guardian le (that is, in the /G le system), the group ID
is set to that of the primary group of the effective user ID.
The le permission and attribute bits are set to the value of the mode parameter, modied
as listed:
All bits set in the process le 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 le permission and appropriate le-type ags are set in the mode
parameter, errno is set to [EINVAL].
If the le exists and is a regular le that is successfully opened, then:
The length of the le is truncated to 0 (zero).
The owner and group of the le are unchanged.
The set user ID attribute of the le mode is cleared.
The open fails if any of these conditions are true:
The le supports enforced record locks, and another process has locked a portion of the
le.
The le does not allow write access.
A program can request some control over when updates should be made permanent for a
regular le opened for write access.
File Type Flags
The le type ags that can be logically ORed into the value specied in the mode parameter are:
S_IFREG Regular le in the OSS le system or in /G, the Guardian le system.
S_ISVTX Sticky bit; used only for directories (cannot be used for les in /G, the Guardian
le system).
S_NONSTOP Regular le in the OSS le system protected by disk process checkpointing.
(Files in /G cannot have this ag set.)
When set, this ag 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).
OSS le-system data caching is disabled for write operations on les for which
this ag is set. Performance is slower than when caching is used, but data
integrity protection increases. Performance is faster than when the O_SYNC
ag in the oag parameter of the open() function is used, but data integrity pro-
tection is less than that provided by O_SYNC use.
132 Hewlett-Packard Company 527186-003