Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

open64(2) OSS System Calls Reference Manual
NAME
open64 - Opens a file for reading or writing; creates a regular le in the OSS environment
LIBRARY
G-series native Guardian processes: system library
G-series native OSS processes: system library
H-series and J-series native Guardian processes: implicit libraries
H-series and J-series OSS processes: implicit libraries
SYNOPSIS
#include <sys/types.h> /* optional except for POSIX.1 */
#include <sys/stat.h> /* optional except for POSIX.1 */
#include <fcntl.h>
int open64(
const char *path,
int oflag
[ , mode_t mode ]);
PARAMETERS
path Points to the pathname of the file to be opened or created.
You cannot specify the files /lost+found, /dev, /dev/tty, and /dev/null for this
parameter when the O_CREAT flag is set for the oflag parameter. Attempts to
create these files cause the function call to fail and errno to be set to [EINVAL].
If the path parameter refers to a symbolic link, the open64() function opens the
file pointed to by the symbolic link.
If the path parameter refers to a file in the Guardian file system (/G), additional
restrictions apply. See the subsection Opening Guardian Files in the
DESCRIPTION section of this reference page for more information.
oflag Specifies the type of access, special open processing, the type of update, and the
initial state of the open file. The parameter value is constructed by logically
ORing special open processing flags. These flags are defined in the fcntl.h
header file and are described in DESCRIPTION.
mode Specifies the read, write, and execute permissions of the file and the file type
flags for the file.
This parameter is required if the file does not exist and the O_CREAT flag is set
in the oflag parameter. If the file already exists and O_CREAT is set, this
parameter is required and must have a valid value, but this parameter has no
effect on the file (you cannot use this parameter to change the permissions of the
file).
If this parameter is specified when values other than O_CREAT are used in the
oflag parameter, the values specified for mode have no effect on whether the file
is opened for reading or writing.
The value of this parameter is constructed by logically ORing flags that are
defined in the sys/stat.h header file. If the parent directory of the created file
does not have default OSS access control 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 con-
tains the new directory. See "ACL Inheritance" in the acl(5) reference page.
516 Hewlett-Packard Company 527186-023