2.9BSD/usr/man/man2/symlink.2

Compare this file to the similar file:
Show the results in this format:

.TH SYMLINK 2
.UC
.SH NAME
symlink \- make symbolic link to a file
.SH SYNOPSIS
.nf
.ft B
symlink(name1, name2)
char *name1, *name2;
.fi
.ft R
.SH DESCRIPTION
A symbolic link to
.I name1
is created;
the link is the file
.IR name2 ,
containing the string \fIname1\fP.
Either name may be an arbitrary path name; the files need not
be on the same file system.
.SH "RETURN VALUE
Upon successful completion, a zero value is returned.
If an error occurs, the error code is stored in \fIerrno\fP
and a \-1 value is returned.
.SH "ERRORS
The symbolic link is made unless on or more of the
following are true:
.TP 20
[EINVAL]
Either
.I name1
or
.I name2
contains a non-ASCII byte.
.TP 20
[ENOTDIR]
A component of the \fIname2\fP prefix is not a directory.
.TP 20
[EEXIST]
\fIName2\fP already exists.
.TP 20
[EACCES]
A component of the \fIname2\fP path previx denies search permission.
.TP 20
[EROFS]
The file \fIname2\fP would reside on a read-only file system.
.TP 20
[EFAULT]
.I Name1
or
.I name2
points outside the process's allocated address space.
.TP 20
[ELOOP]
Too may symbolic links were encountered in translating the path name.
.SH "SEE ALSO"
ln(1), link(2), unlink(2)