Skip to content
BSD syscall#6

svc · unix #6

sys_close

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

Prototype

int sys_close(int fd);

Returns: int

Arguments

NameTypeDirDescription
fdint-

Version history

XNU tagmacOS#
xnu-7195.50.7.100.1macOS 11.0 Big Sur6
xnu-8019.41.5macOS 12.0 Monterey6
xnu-8792.41.9macOS 13.0 Ventura6
xnu-10002.1.13macOS 14.0 Sonoma6
xnu-11215.1.10macOS 15.0 Sequoia6
xnu-11417.101.15macOS 15.4 Sequoia6
xnu-12377.1.9macOS 26.0 Tahoe6
xnu-10002.41.9—6
xnu-10002.61.3—6
xnu-10002.81.5—6
xnu-10063.101.15—6
xnu-10063.121.3—6
xnu-10063.141.1—6
xnu-11215.41.3—6
xnu-11215.61.5—6
xnu-11215.81.4—6
xnu-11417.121.6—6
xnu-11417.140.69—6
xnu-12377.101.15—6
xnu-12377.41.6—6
xnu-12377.61.12—6
xnu-12377.81.4—6
xnu-7195.101.1—6
xnu-7195.121.3—6
xnu-7195.141.2—6
xnu-7195.60.75—6
xnu-7195.81.3—6
xnu-8019.61.5—6
xnu-8019.80.24—6
xnu-8020.101.4—6
xnu-8020.121.3—6
xnu-8020.140.41—6
xnu-8792.61.2—6
xnu-8792.81.2—6
xnu-8796.101.5—6
xnu-8796.121.2—6
xnu-8796.141.3—6

Notes

sys_close is the kernel-side C function backing the close entry in the BSD syscall table. Cross-reference: close (and close_nocancel for the cancellation-safe variant).

Related APIs

closeclose_nocancelopendup