tipc_shutdown(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

tipc_shutdown β€” shutdown socket connection πŸ’…

okay so real quick bestie, before we even get into it: this is from the Kernel API Manual, section 9, and it's all about that one little function that ends a TIPC connection and clears the decks. stay with me, it's short and it slays 🫢


🌸 SYNOPSIS 🌸

int tipc_shutdown (struct socket *sock , int how );

like, that's the whole signature. two args, one int coming back at you. no cap, that's it πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • sock β€” the socket structure. your main character. this is the socket you're shutting down ✨
  • how β€” the direction to close, and heads up: it must be SHUT_RDWR. not a suggestion, not a vibe, it just has to be that. πŸ’€

πŸ’– DESCRIPTION πŸ’–

so what does it actually do? two things, in order:

  1. It terminates the connection (if necessary β€” key phrase, if necessary, iykyk).
  2. Then it purges the socket's receive queue.

that's the entire personality. connection ended, receive queue yeeted, done. 🌈

not me emphasizing that "if necessary" β€” but fr fr, the connection termination is conditional, the receive-queue purge is just what happens. don't @ me, that's literally the manpage.

πŸ‘‘ RETURN πŸ‘‘

  • 0 on success πŸŽ‰
  • errno otherwise 😭

like, it's giving classic kernel return convention and honestly? iconic.


🧚 SEE ALSO 🧚

the whole friend group, no one left out. also: Kernel file ./net/tipc/socket.c β€” that's where the source lives, go say hi πŸ’œ


<aqua>okay that's the whole page, bestie, you ate that 🫢 this came out of the ./net/tipc corner of the kernel tree, dated October 2026, and it lives in section 9 of the Kernel API Manual β€” periodt. πŸ’…βœ¨</aqua>

πŸ“¦ where this page comes from