php / pecl-networking-ssh2

Bindings for the libssh2 library
http://pecl.php.net/package/ssh2
Other
51 stars 59 forks source link

Add ssh2_send_eof function #45

Closed NattyNarwhal closed 3 years ago

NattyNarwhal commented 3 years ago

Without this, you can't close the standard input stream without also closing the standard output stream. One can try to redirect standard output to error, but having a reference on the error stream keeps a reference on the stdio stream, so closing stdio won't decrement the reference count enough to actually close the stream.

This makes it possible to use programs over SSH that take their input over standard input without any temporary files/redirection, and get the output back over standard output.