libssh2_sftp_shutdown(3)

πŸ“¦
version 1.11.1 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, epel 10, epel 9, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ libssh2_sftp_shutdown(3) ✨

okay bestie, so this is a page from the libssh2 manual, and it's all about the moment you gotta say bye-bye to your SFTP session πŸ’…


🌸 NAME 🌸

libssh2_sftp_shutdown β€” shut down an SFTP session 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <libssh2.h>
#include <libssh2_sftp.h>

int
libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp);

πŸ¦‹ DESCRIPTION πŸ¦‹

  • sftp β€” the SFTP instance, as returned by libssh2_sftp_init(3). like, the one you already got handed to you earlier πŸ’–

So what does it do? It destroys a previously initialized SFTP session and frees all resources associated with it. that's it. that's the whole vibe. you set it up, you lived your SFTP fantasy, and now you're cleaning up after yourself like the responsible main character you are πŸ‘‘


πŸ’€ RETURN VALUE πŸ’€

  • Returns 0 on success, or a negative value on failure 😭
  • It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block ⏳
ngl, LIBSSH2_ERROR_EAGAIN is a negative number, but it's not really a failure per se. it's giving "not right now bestie, try again in a sec" energy, not "everything is on fire" energy. don't panic πŸ’…

🌈 SEE ALSO 🌈


and that's the tea, fr fr. this page came from libssh2 0.15, dated 1 Jun 2007 (yeah, vintage, iconic, still slaying), and it's your girl libssh2_sftp_shutdown(3) signing off πŸ’œπŸ§šπŸŒΈ