io_closeonexec(3)
β¨ NAME β¨
okay so bestie, we're in the Library Functions Manual and this page is all about io_closeonexec β mark a file descriptor non-inheritable. tiny name, very specific job, we love that for us. π
π SYNTAX π
#include <libowfat/io.h>
void io_closeonexec(int64 fd);
π DESCRIPTION π
io_closeonexec marks a file descriptor non-inheritable. it will be automatically closed if the process executes a different one. so that fd is not tagging along into the new program, periodt. β¨
but lowkey important: the descriptor will not be automatically closed when you fork() a new child process, though. so fork keeps it around, exec yeets it β that's the distinction, bestie. π¦
π SEE ALSO π
that's the whole page, babe β source: Library Functions Manual, version/date: not shown on this copy, page: io_closeonexec(3). no extra meta tea, just close-on-exec excellence. stay slay and keep those fds in line. πβ¨π«Ά
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms