Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ssh2_send_eof function #45

Merged
merged 2 commits into from Dec 31, 2020
Merged

Conversation

NattyNarwhal
Copy link
Member

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.

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, and get the
output back over standard output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants