Open System Services System Calls Reference Manual (G06.28+, H06.05+)
open(2) OSS System Calls Reference Manual
• If the O_NONBLOCK flag is set, the open() function returns an error if no process
currently has the file open for reading.
The O_RDWR file access flag is supported when opening a FIFO file; the call to the open()
function finishes immediately, even if the O_NONBLOCK flag is not set.
When opening a character special file that supports nonblocking opens, such as a terminal dev-
ice:
• If the O_NONBLOCK flag is not set, the open() function blocks until the device is
ready or available.
• If the O_NONBLOCK flag is set, the open() function returns without waiting for the
device to be ready or available. Subsequent behavior of the device is device-specific.
When opening a directory, the open fails, and errno is set to [EISDIR], if either of these condi-
tions is true:
• The directory is /E or /G (the Guardian file system) or a directory within /G.
• The directory is not /E or /G and is not within /E or /G, and the file access flag is either
O_WRONLY or O_RDWR.
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 S_NONSTOP is an alias for O_SYNC.
Opening Guardian Files
If the file is a Guardian file (that is, if it is in the /G file system):
• The file can be opened only if it is:
— AFormat1file or a Format 2 file that is smaller than 2 gigabytes, on a physical |
disk volume, and either:
— An odd, unstructured Enscribe file. In this case, it is opened as a regular
file with a primary and secondary extent size that is a multiple of 2. If
the extent size is odd, the open fails.
If the unstructured buffer size was not 4096, a successful open makes the
buffer size 4096 (as if the Guardian procedure SETMODE was called for
mode 93 with a parameter value of 4096).
— An EDIT file (file code 101). In this case, it is opened as a regular file
for read-only access.
— A Telserv or OSSTTY terminal process.
5−8 Hewlett-Packard Company 527186-007