openat64

Name

openat64 -- open a file relative to a directory file descriptor (Large File Support)

Synopsis

#include <fcntl.h>

int openat64(int fd, const char * path, int oflag, ...);

Description

openat64() shall establish a connection between a file and a file descriptor. It shall be identical open64() except in the case where path specifies a relative path. In this case, the file to be opened shall be determined relative to the directory associated with the file descriptor fd instead of the current working directory.

openat64() is a large-file version of the openat() function as defined in POSIX 1003.1 2008. It differs from openat() in the same way that open64() differs from open(), that the open is done in large-file mode.

Return Value

On success, openat64() returns a new file descriptor. Otherwise openat64() shall return -1 and set errno to indicate the error.

Errors

See openat() for possible error values.