Open System Services System Calls Reference Manual (G06.28+, H06.05+)

System Functions (n - p) open(2)
The le status ags that dene the initial state of the open le are:
O_APPEND Open the le only for append access. If set, the le pointer is set to the end of
the le before each write.
This ag is ignored for Telserv terminal devices.
O_NONBLOCK
Open the le for nonblocked access. If set, the call to open() does not block,
and subsequent read() or write() operations on the le are nonblocking.
When opening a regular disk le or an OSS directory, the O_NONBLOCK ag
is ignored.
Calling the open() function with the O_NONBLOCK ag for FIFO les and for
character special devices that support nonblocking opens is supported.
Calling the open() function with the O_NONBLOCK ag is supported for Tel-
serv terminal devices (tty) as listed:
For a static window, the open operation is always allowed; it nishes
when the connection is established.
For a dynamic window, the open operation is allowed only if a connec-
tion is already established.
Calling the open() function with the O_NONBLOCK ag is supported for
OSSTTY terminal devices (ztty). OSSTTY devices support only three static
windows, one each for #stdin, #stdout, and #stderr.
O_SYNC The O_SYNC ag provides a high level of data integrity for writes to regular |
les. For HP NonStop systems, you can use the OSS Monitor to select one of |
multiple levels of fault tolerance. For more information, see the discussion of the |
FTIOMODE attribute in the Open System Services Management and Operations |
Guide.
General Notes on oag Parameter Flag Values
The effect of setting the O_CREAT ag is immediate.
When opening a le with the O_CREAT ag set:
If the named le does not already exist, a regular disk le is created.
If the named le is not a regular le, the O_CREAT ag is ignored.
When opening a FIFO le with the O_RDONLY ag set:
If the O_NONBLOCK ag is not set, the open() function blocks until another process
opens the le for writing. If the le is already open for writing (even by the calling pro-
cess), the function returns without delay.
If the O_NONBLOCK ag is set, the open() function returns immediately.
When opening a FIFO le with the O_WRONLY ag set:
If the O_NONBLOCK ag is not set, the open() function blocks until another process
opens the le for reading. If the le is already open for reading (even by the calling pro-
cess), the function returns without delay.
527186-007 Hewlett-Packard Company 57