libssh2_channel_wait_closed(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_channel_wait_closed(3) πŸ’–

okay bestie, welcome to the libssh2 manual, and today's main character is libssh2_channel_wait_closed β€” literally the "bestie hold on, they're still typing" function 🫢


✨ NAME ✨

libssh2_channel_wait_closed β€” wait for the remote to close the channel πŸ’…


🌸 SYNOPSIS 🌸

#include <libssh2.h>

int
libssh2_channel_wait_closed(LIBSSH2_CHANNEL *channel);

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: you call this and you enter a temporary blocking state until the remote host closes the named channel. That's it, that's the whole personality ✨

It's typically sent after libssh2_channel_close(3), and the whole point of sitting there waiting is so you can go examine the exit status. Like, you can't read the receipt until the store actually closes, yk? πŸ‘‘


πŸ’€ RETURN VALUE πŸ’€

  • Returns 0 on success, or negative on failure. no cap.
  • It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block.
  • And like, yes, LIBSSH2_ERROR_EAGAIN is a negative number, but bestie, it is not really a failure per se. don't panic. it's giving "try again later", not "everything is on fire" 😭

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the page fr fr 🌈 this one's from libssh2 version 0.19, dated 29 Nov 2007 β€” yeah she's vintage, she's iconic, she ate πŸ’–πŸŽ€πŸ¦‹