Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/link.2
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)link.2 8.3 (Berkeley) 1/12/94 | .\" @(#)link.2 8.3 (Berkeley) 1/12/94 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd December 1, 2017 | .Dd October 20, 2018 | ||||
.Dt LINK 2 | .Dt LINK 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm link , | .Nm link , | ||||
.Nm linkat | .Nm linkat | ||||
.Nd make a hard file link | .Nd make a hard file link | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | |||||
list, defined in | list, defined in | ||||
.In fcntl.h : | .In fcntl.h : | ||||
.Bl -tag -width indent | .Bl -tag -width indent | ||||
.It Dv AT_SYMLINK_FOLLOW | .It Dv AT_SYMLINK_FOLLOW | ||||
If | If | ||||
.Fa name1 | .Fa name1 | ||||
names a symbolic link, a new link for the target of the symbolic link is | names a symbolic link, a new link for the target of the symbolic link is | ||||
created. | created. | ||||
.It Dv AT_BENEATH | |||||
Do not allow to link to a file which is not a child of the starting | |||||
directory. | |||||
.El | .El | ||||
.Pp | .Pp | ||||
If | If | ||||
.Fn linkat | .Fn linkat | ||||
is passed the special value | is passed the special value | ||||
.Dv AT_FDCWD | .Dv AT_FDCWD | ||||
in the | in the | ||||
.Fa fd1 | .Fa fd1 | ||||
▲ Show 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | |||||
.Fa name2 | .Fa name2 | ||||
argument is not an absolute path and | argument is not an absolute path and | ||||
.Fa fd1 | .Fa fd1 | ||||
or | or | ||||
.Fa fd2 , | .Fa fd2 , | ||||
respectively, is neither | respectively, is neither | ||||
.Dv AT_FDCWD | .Dv AT_FDCWD | ||||
nor a file descriptor associated with a directory. | nor a file descriptor associated with a directory. | ||||
.It Bq Er ENOTCAPABLE | |||||
.Fa name1 | |||||
was absolute or a ".." component leading to a directory outside of | |||||
the directory hierarchy rooted by the start directory, and the | |||||
.Dv AT_BENEATH | |||||
flag was specified. | |||||
.El | .El | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr chflags 2 , | .Xr chflags 2 , | ||||
.Xr readlink 2 , | .Xr readlink 2 , | ||||
.Xr symlink 2 , | .Xr symlink 2 , | ||||
.Xr unlink 2 | .Xr unlink 2 | ||||
.Sh STANDARDS | .Sh STANDARDS | ||||
The | The | ||||
Show All 21 Lines |