xs_tcp_shutdown(9)
π 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:
xs_nospace(9)xs_local_send_request(9)xs_udp_send_request(9)xs_tcp_send_request(9)xs_error_report(9)xs_close(9)xs_destroy(9)xs_udp_data_read_skb(9)xs_data_ready(9)xs_local_state_change(9)xs_tcp_state_change(9)xs_udp_write_space(9)xs_tcp_write_space(9)xs_udp_set_buffer_size(9)xs_udp_timer(9)xs_set_port(9)xs_local_setup_socket(9)xs_enable_swap(9)xs_disable_swap(9)xs_tcp_setup_socket(9)xs_tls_handshake_done(9)xs_tcp_tls_setup_socket(9)xs_connect(9)xs_local_print_stats(9)xs_udp_print_stats(9)xs_tcp_print_stats(9)bc_send_request(9)xs_setup_local(9)xs_setup_udp(9)xs_setup_tcp(9)xs_setup_tcp_tls(9)xs_setup_bc_tcp(9)init_socket_xprt(9)cleanup_socket_xprt(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms