Skip to content
BSD syscall#551

svc · unix #551

freadlink

Reads the target of a symbolic link referenced by an open file descriptor (macOS extension).

Prototype

int freadlink(int fd, user_addr_t buf, user_size_t bufsize);

Returns: int

Arguments

NameTypeDirDescription
fdint-
bufuser_addr_t-
bufsizeuser_size_t-

Version history

XNU tagmacOS#
xnu-8792.41.9macOS 13.0 Ventura551
xnu-10002.1.13macOS 14.0 Sonoma551
xnu-11215.1.10macOS 15.0 Sequoia551
xnu-11417.101.15macOS 15.4 Sequoia551
xnu-12377.1.9macOS 26.0 Tahoe551
xnu-10002.41.9—551
xnu-10002.61.3—551
xnu-10002.81.5—551
xnu-10063.101.15—551
xnu-10063.121.3—551
xnu-10063.141.1—551
xnu-11215.41.3—551
xnu-11215.61.5—551
xnu-11215.81.4—551
xnu-11417.121.6—551
xnu-11417.140.69—551
xnu-12377.101.15—551
xnu-12377.41.6—551
xnu-12377.61.12—551
xnu-12377.81.4—551
xnu-8020.101.4—551
xnu-8020.121.3—551
xnu-8020.140.41—551
xnu-8792.61.2—551
xnu-8792.81.2—551
xnu-8796.101.5—551
xnu-8796.121.2—551
xnu-8796.141.3—551

Notes

Useful when the link was opened with O_SYMLINK and the caller already holds a fd. Avoids re-resolving the path and is safe against namespace changes between open and read.

Detection

syscall::freadlink:entry in DTrace.

Related APIs

readlinkreadlinkatopensymlink