xs_tcp_shutdown(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– xs_tcp_shutdown β€” bestie, we're closing this socket nicely πŸ’–

okay so this page lives in the Kernel API Manual, and it's all about one very specific little function that gets a TCP socket to log off gracefully instead of just ghosting everyone. ✨


✨ NAME ✨

xs_tcp_shutdown β€” gracefully shut down a TCP socket 🫢

like, politely. with manners. unlike your ex.


🌸 SYNOPSIS 🌸

void xs_tcp_shutdown (struct rpc_xprt *xprt );

no return value, it just does the thing and dips πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • xprt β€” the transport 🌈 (yes that's the whole description, it's giving minimalism, we respect it)

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: this function initiates a graceful shutdown of the TCP socket ✨ β€” and the way it does that is by calling the equivalent of:

shutdown(SHUT_RDWR);

No cap, that's it. It's not tearing the whole thing down from orbit, it's not being dramatic β€” it's a graceful shutdown. Read and write both get shut off (SHUT_RDWR), and the socket gets to leave with its dignity intact. πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘

all the sibling functions, in the order the page lists them, because we do not skip entries in this house:

and if you wanna read the actual source (iconic behaviour, honestly), it's the kernel file ./net/sunrpc/xprtsock.c πŸ“


lowkey the shortest manpage ever and yet it ate. go read xs_close(9) next if you're feeling chaotic πŸ’€

🌷 okay that's the whole page!! this dropped from ./net/sunrpc back in October 2026, under the Kernel API Manual umbrella β€” mwah, love that for us, bye bestie!! πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from