_Fork(3)

πŸ’– _Fork(3) β€” the Library Functions Manual edition ✨

okay bestie, sit down, hydrate, and let's talk about _Fork 🫢 this is a page from the Library Functions Manual, and it is lowkey iconic for how short and drama-free it is. no cap.


🌸 NAME 🌸

_Fork β€” create a child process πŸ‘Άβœ¨


πŸ“š LIBRARY πŸ“š

Standard C library β€” that's libc, link it with -lc πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <unistd.h>

pid_t _Fork(void);

that's it. that's the whole vibe. one header, one function, one return type. minimalist queen πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜•: this function is equivalent to fork(2), except for one lil but very important detail β€” the fork handlers you registered with pthread_atfork(3) are not called. like, at all. not even a little bit. πŸ’€

that's the whole difference. everything else? same energy as fork(2). same behavior, same deal β€” just without the atfork handlers doing their little pre/post-fork dance. πŸ™ˆ


⭐ STANDARDS ⭐

POSIX.1-2024 β€” yeah she's certified, certified recent too 🌈


🧚 HISTORY 🧚

POSIX.1-2024. born in the same era she was standardized in, periodt. πŸ’œ


πŸ‘€ SEE ALSO πŸ‘€

go read those too, they're the siblings fr fr πŸ“


a gentle reminder for my besties: when a manpage says "equivalent to X except…" the except is the whole entire plot. don't skim it. πŸ’…

and that's the page!! brought to you by Linux man-pages 6.20, dated 2025-10-29 β€” mwah, love that for us, stay slay, go fork responsibly πŸ˜­πŸ’–πŸŒΈ

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms