Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)
Guardian Native C Library Calls (f) fopen_oss(3)
NAME
fopen_oss - Opens a stream (OSS fopen( ) function)
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <stdio.h>
FILE ∗∗fopen(
const char ∗∗path,
const char ∗∗mode);
FILE ∗∗fopen_oss(
const char ∗∗path,
const char ∗∗mode);
PARAMETERS
path Points to a character string that contains the name of the file to be opened. If the
final component of the path parameter specifies a symbolic link, the link is
traversed and pathname resolution continues.
mode Points to a character string that controls whether the file is opened for reading
(r), writing (w), or appending (a) and whether the file is opened for updating (+). |
If the parent directory of the created file does not have default OSS access con- |
trol list (ACL) entries, the permissions for the new file are the bit-wise AND of |
this mode parameter with the complement of the process umask (see the |
umask(2) reference page). If the parent directory of the created file has default |
ACL entries, the permissions for the new file are affected by the value of this |
parameter but depend on both the support for OSS ACLs on the system on which |
this process is running and on the fileset that contains the new directory. See |
"ACL Inheritance" in the acl(5) reference page.
DESCRIPTION
The fopen( ) OSS function and fopen_oss( ) function open the file named by the path parameter
and associate a stream with it, returning a pointer to the FILE structure of this stream.
These functions are identical in the OSS environment. Unless otherwise noted, this reference
page uses fopen() to refer to both the fopen( ) OSS function and fopen_oss( ) function.
The mode parameter controls the access allowed to the stream. It can have one of the following
values:
r Open an existing file for read-only access.
w Create a file (or truncate an existing file to length zero) and open it for write-only
access.
a Create a file (or open an existing file) and open it for append (write at the end of
the file) access.
r+ Open an existing file for update access (reading and writing).
527192-007 Hewlett-Packard Company 2−43