Assign a pathname to a file descriptor
#include <unistd.h>
int flink( int fd,
           const char *path );
libc
The flink() function assigns the pathname, path, to
the file associated with the file descriptor, fd.
- 0
  
- Success.
- -1
  
- An error occurred; errno
    is set.
- 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.
Unix
| Safety: |  | 
|---|
| Cancellation point | No | 
| Interrupt handler | No | 
| Signal handler | Yes | 
| Thread | Yes | 
link()