kernel_accept(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

kernel_accept β€” accept a connection (kernel space) ✨

okay so bestie, this is kernel_accept(9) from the Kernel API Manual, and it's literally the kernel-space way to accept a connection. no cap. 🫢


🌸 SYNOPSIS 🌸

int kernel_accept (struct socket *sock , struct socket **newsock , int
       flags );

πŸŽ€ ARGUMENTS πŸŽ€

  • sock β€” the listening socket, aka the one out here waiting for a connection to slide into its DMs πŸ’Œ
  • newsock β€” the new connected socket, aka the fresh little connection that shows up after accept slays ✨
  • flags β€” the flags. yes, that's the whole description. iconic brevity, honestly πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe check: flags must be SOCK_CLOEXEC, SOCK_NONBLOCK, or 0. those are the only choices, bestie β€” no improvising, no "oops I made up a flag" energy πŸ™ˆ

if it fails, newsock is guaranteed to be NULL. like, that's the promise. no dangling fake socket, periodt. πŸ”₯

it returns 0 or an error. that's it. that's the whole return situation πŸ’€


🌈 SEE ALSO 🌈

Kernel file ./net/socket.c β€” and the whole extended friend group, iykyk:


okay bye bestie 🫢 β€” source/version is ./net and the date is October 2026, so that's the cute lil sign-off βœ¨πŸ’–

πŸ“¦ where this page comes from