-
Notifications
You must be signed in to change notification settings - Fork 59
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
PtySession::expect_eof never finishes with current nightly build #38
Comments
From what I've tested, error started from nightly-2021-07-03 onward. |
Good catch @Jonathas-Conceicao. I have a guess after a short investigation and as I was facing something as strange in the nearest. ref: zhiburt/ptyprocess#7 Essentially they introduce a new type of @philippkeller I hope you don't mind if I refer to Note: Just tested [dependencies]
expectrl = {git = "https://github.com/zhiburt/expectrl"} use expectrl::Eof;
fn main() {
let mut p = expectrl::spawn("echo 'working as expected'").unwrap();
println!("{:?}", String::from_utf8_lossy(p.expect(Eof).unwrap().found_match()));
} [mzhiburt@fedora exampleexpectrl]$ cargo run
Compiling exampleexpectrl v0.1.0 (/home/mzhiburt/projects/exampleexpectrl)
Finished dev [unoptimized + debuginfo] target(s) in 1.47s
Running `target/debug/exampleexpectrl`
"'working as expected'\r\n"
[mzhiburt@fedora exampleexpectrl]$ cargo --version --verbose
cargo 1.56.0-nightly (e96bdb0c3 2021-08-17)
release: 1.56.0
commit-hash: e96bdb0c3d0a418e7fcd7fbd69be08abf830b4bc
commit-date: 2021-08-17 |
@zhiburt thanks for stepping in and I have absolutely nothing against promoting your repo - as I currently have not time maintaining this |
Closed with #40 |
I've traced down the source of a faulty execution in a application that I contribute to the
PtySession::expect_eof
never finishing execution on Rut's currently nightly build.I have a little example that can reproduce the problem:
When I run this on nightly the timeout is reached, and if no timeout is set the execution just hangs indefinitely. On stable it just works as expected.
Here's my rust and cargo version for the nightly build:
Would appreciate if you guys could make it compatible with nightly again as it is what I use during development. In the mean time I'll be pining down my nightly to the last working release.
The text was updated successfully, but these errors were encountered: