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

System Functions (n - p) open(2)
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 Open for synchronized update. If set, updates and writes to regular les are syn-
chronous updates. This ag is ignored for les that are not regular les. File
update is performed by:
The open() function with the O_TRUNC ag
The write() function
On return from a call to either of these functions that performs a synchronous
update (a call with the O_SYNC ag set), the calling process is ensured that all
data for the le has been written to permanent storage, even if the le is also
open for deferred update. OSS le-system data caching is disabled for write
operations on les for which this ag is set.
Synchronous updates provide the highest level of data integrity protection but
the slowest performance. Compare with the use of the S_NONSTOP ag, as
described in File Type Flags later in this reference page.
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.
If the O_NONBLOCK ag is set, the open() function returns an error if no process
currently has the le open for reading.
The O_RDWR le access ag is supported when opening a FIFO le; the call to the open()
function nishes immediately, even if the O_NONBLOCK ag is not set.
When opening a character special le that supports nonblocking opens, such as a terminal dev-
ice:
If the O_NONBLOCK ag is not set, the open() function blocks until the device is
ready or available.
527186-003 Hewlett-Packard Company 57