rust-cli / rexpect

.github/workflows/ci.yml
https://docs.rs/rexpect
MIT License
329 stars 58 forks source link

PtyProcess: add NO_CTTY flag #101

Closed petreeftime closed 1 year ago

petreeftime commented 1 year ago

The default behavior of posix_openpt seems to be to replace the controlling terminal for the calling process, and PtyProcess should only change it for child instead. I think this might be a reason why some of the tests were failing non-deterministacally sometimes, although I am not 100% confident in this fix.

Signed-off-by: Petre Eftime petre.eftime@gmail.com

petreeftime commented 1 year ago

bors try

bors[bot] commented 1 year ago

try

Build succeeded:

petreeftime commented 1 year ago

@matthiasbeyer so far this passes 100% of the tests.

petreeftime commented 1 year ago

bors try

petreeftime commented 1 year ago

Ah. This failed as well.

bors[bot] commented 1 year ago

try

Build failed:

petreeftime commented 1 year ago

bors try

bors[bot] commented 1 year ago

try

Build failed:

petreeftime commented 1 year ago

bors try

bors[bot] commented 1 year ago

try

Build succeeded:

petreeftime commented 1 year ago

bors try

bors[bot] commented 1 year ago

try

Build failed:

petreeftime commented 1 year ago

In pexpect, a similar issue is called out: https://github.com/pexpect/pexpect/blob/2532721644781543ca660e52d48a35bd93872fc1/doc/commonissues.rst#timing-issue-with-send-and-sendline

petreeftime commented 1 year ago

bors try

bors[bot] commented 1 year ago

try

Build succeeded:

petreeftime commented 1 year ago

bors try

bors[bot] commented 1 year ago

try

Build failed:

petreeftime commented 1 year ago

bors try

bors[bot] commented 1 year ago

try

Build failed:

petreeftime commented 1 year ago

Yes, so far I was reading through how pexpect or some other terminal emulators set this up and see if we're missing anything. So far, not luck with getting the issue fixed unfortunately, and no matter what I do I can't seem to be able to reproduce it on my setup.

matthiasbeyer commented 1 year ago

Yeah that also was the case for me... it seems like we only have this issue in CI, which makes it even worse.