mirror of https://github.com/mkerrisk/man-pages
Noted discrepancy between Linux and POSIX.1 when oldpath is a symbolic
link.
This commit is contained in:
parent
3d9a2200a6
commit
490df3ae03
23
man2/link.2
23
man2/link.2
|
@ -48,7 +48,7 @@ be overwritten.
|
|||
This new name may be used exactly as the old one for any operation;
|
||||
both names refer to the same file (and so have the same permissions
|
||||
and ownership) and it is impossible to tell which name was the
|
||||
`original'.
|
||||
\`original'.
|
||||
.SH "RETURN VALUE"
|
||||
On success, zero is returned. On error, \-1 is returned, and
|
||||
.I errno
|
||||
|
@ -130,6 +130,27 @@ Hard links, as created by
|
|||
cannot span filesystems. Use
|
||||
.B symlink
|
||||
if this is required.
|
||||
|
||||
POSIX.1-2001 says that
|
||||
.BR link
|
||||
should dereference
|
||||
.I oldpath
|
||||
if it is a symbolic link.
|
||||
However, Linux does not do so: if
|
||||
.I oldpath
|
||||
is a symbolic link, then
|
||||
.I newpath
|
||||
is created as a (hard) link to the same symbolic link file
|
||||
(i.e.,
|
||||
.I newpath
|
||||
becomes a symbolic link to the same file that
|
||||
.I oldpath
|
||||
refers to).
|
||||
Some other implementations behave in the same manner as Linux.
|
||||
.\" For example, the default Solaris compilation environment
|
||||
.\" behaves like Linux, and contributors to a March 2005
|
||||
.\" thread in the Austin mailing list reported that some
|
||||
.\" other (SysV) implementations did/do the same -- MTK, Apr 05
|
||||
.SH "CONFORMING TO"
|
||||
SVr4, SVID, POSIX, BSD 4.3, X/OPEN. SVr4 documents additional ENOLINK and
|
||||
EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
|
||||
|
|
Loading…
Reference in New Issue