Skip to content

PtySession::expect_eof never finishes with current nightly build #38

@Jonathas-Conceicao

Description

@Jonathas-Conceicao

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:

// On Cargo.toml
// [dependencies]
// rexpect = "0.4"

fn main() {
    let mut p = rexpect::spawn("echo 'working as expected'", Some(10000)).unwrap();
    println!("{}", p.exp_eof().unwrap());
}

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:

$ rustc --version --verbose
rustc 1.56.0-nightly (30a0a9b69 2021-08-17)
binary: rustc
commit-hash: 30a0a9b694cde95cbab863f7ef4d554f0f46b606
commit-date: 2021-08-17
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 12.0.1

$ cargo --version --verbose
cargo 1.56.0-nightly (b51439fd8 2021-08-09)
release: 1.56.0
commit-hash: b51439fd8b505d4800a257acfecf3c69f81e35cf
commit-date: 2021-08-09

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions