doy / pty-process

Other
22 stars 16 forks source link

in basic example select blocks after child has exited and wrapper requires additional input #15

Open mzr opened 4 months ago

mzr commented 4 months ago

Hi!

I'm looking to create a wrapper program that tricks the child process into thinking it still has an interactive terminal. The example in basic.rs is almost what I need, however if the child exits on its own, select blocks and the wrapper is not able to detect it can wait on a child, and exit.

I need to have some extra input in the terminal so select resumes and waits on the child.

Wrapping echo abcd in the basic.rs reproduces this.

I can't see a way to adopt this unfortunately. Would appreciate some help here :)