Skip to content
BSD syscall#41

svc · unix #41

sys_dup

Internal XNU symbol name for the dup(2) syscall; the public wrapper is dup(2).

Prototype

int sys_dup(u_int fd);

Returns: int

Arguments

NameTypeDirDescription
fdu_int-

Version history

XNU tagmacOS#
xnu-7195.50.7.100.1macOS 11.0 Big Sur41
xnu-8019.41.5macOS 12.0 Monterey41
xnu-8792.41.9macOS 13.0 Ventura41
xnu-10002.1.13macOS 14.0 Sonoma41
xnu-11215.1.10macOS 15.0 Sequoia41
xnu-11417.101.15macOS 15.4 Sequoia41
xnu-12377.1.9macOS 26.0 Tahoe41
xnu-10002.41.9—41
xnu-10002.61.3—41
xnu-10002.81.5—41
xnu-10063.101.15—41
xnu-10063.121.3—41
xnu-10063.141.1—41
xnu-11215.41.3—41
xnu-11215.61.5—41
xnu-11215.81.4—41
xnu-11417.121.6—41
xnu-11417.140.69—41
xnu-12377.101.15—41
xnu-12377.41.6—41
xnu-12377.61.12—41
xnu-12377.81.4—41
xnu-7195.101.1—41
xnu-7195.121.3—41
xnu-7195.141.2—41
xnu-7195.60.75—41
xnu-7195.81.3—41
xnu-8019.61.5—41
xnu-8019.80.24—41
xnu-8020.101.4—41
xnu-8020.121.3—41
xnu-8020.140.41—41
xnu-8792.61.2—41
xnu-8792.81.2—41
xnu-8796.101.5—41
xnu-8796.121.2—41
xnu-8796.141.3—41

Notes

Newer XNU branches prefix the C implementations of BSD syscalls with sys_ to avoid colliding with libc symbol names; the entry in the syscall table still exposes it as dup. See dup for behaviour.

Related APIs

dupdup2fcntlclose