[Previous] [Contents] [Next]

flink()

Assign a pathname to a file descriptor

Synopsis:

#include <unistd.h>

int flink( int fd,
           const char *path );

Library:

libc

Description:

The flink() function assigns the pathname, path, to the file associated with the file descriptor, fd.

Returns:

0
Success.
-1
An error occurred; errno is set.

Errors:

EACCES
Search permission is denied on a component of the path prefix, or the file exists and the permissions specified by oflag are denied, or the file doesn't exist and write permission is denied for the parent directory of the file to be created.
EBADF
Bad file number.
ENOTDIR
A component of the path prefix isn't a directory.
EROFS
The named file resides on a read-only filesystem and either O_WRONLY, O_RDWR, O_CREAT (if the file doesn't exist), or O_TRUNC is set in the oflag argument.

Classification:

Unix

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

link()


[Previous] [Contents] [Next]