libssh2_channel_process_startup(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_process_startup ✨

okay bestie, welcome to the libssh2 manual, page libssh2_channel_process_startup(3) πŸ’… this one is all about asking a channel to start up a lil process for you, and honestly? it's giving main character energy πŸŽ€


🌸 NAME 🌸

libssh2_channel_process_startup β€” request a shell on a channel 🐚✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <libssh2.h>

int
libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel,
                                const char *request,
                                unsigned int request_len,
                                const char *message,
                                unsigned int message_len);

like. look at those params. five of them. we love a full lineup πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

so here's the tea, fr fr β˜•:

  • channel β€” the active session channel instance. this is your girl, your channel, the one doing the actual work.
  • request β€” the type of process to startup. the SSH2 protocol currently defines shell, exec, and subsystem as the standard process services. that's the whole menu, no secret items πŸ“
  • request_len β€” the length of the request parameter.
  • message β€” request-specific message data to include. like, the details that go with whatever request you picked.
  • message_len β€” the length of the message parameter.

and what does it do? it initiates a request on a session type channel β€” like the kind you get handed back from libssh2_channel_open_ex(3) 🫢 so like, you get the channel first, and then you ask it to start something up. order matters, iykyk.


πŸ”₯ RETURN VALUE πŸ”₯

returns 0 on success, or a negative number on failure. it also returns LIBSSH2_ERROR_EAGAIN when it would otherwise block β€” and yes, LIBSSH2_ERROR_EAGAIN is technically a negative number, but bestie, it is not really a failure per se πŸ’€ it's just the vibe saying "try again later, girl."

no cap: negative does not always mean bad here. read the actual error code before you spiral πŸ™ˆ

πŸ’€ ERRORS πŸ’€

  • LIBSSH2_ERROR_ALLOC β€” an internal memory allocation call failed. the malloc girlies are struggling 😭
  • LIBSSH2_ERROR_SOCKET_SEND β€” unable to send data on socket. the socket said no thank you 🫠
  • LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED β€” that's the whole entry, bestie, the original just names it and dips. denied is denied πŸ’…

🌈 SEE ALSO 🌈


and that's the page!! πŸ’œ this one comes from the libssh2 manual, version 0.15, dated 1 Jun 2007 β€” yeah she's an elder icon but she still slays πŸ‘‘βœ¨ mwah, go start some processes, love u πŸŽ€πŸ¦‹