Skip to content
Discussion options

You must be logged in to vote

The issue is that the kernel hasn't flagged the stdin stream as having reached EOF so bash is waiting for the next line of input, so the read_to_string call is blocked waiting for bash to output more or signal EOF.

You can force the kernel to recognize EOF by sending EOT (\x04) at the end of your input:

writeln!(pair.master, "ls -l\r\n\x04")?;

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@wez
Comment options

wez Aug 12, 2022
Maintainer

@seabass-space
Comment options

@walidkorchi
Comment options

Answer selected by seabass-space
Comment options

You must be logged in to vote
2 replies
@wez
Comment options

wez Apr 5, 2023
Maintainer

@uwejan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants