pty
pty copied to clipboard
shell example: "The goroutine will keep reading until the next keystroke before returning."
Hello, I'm trying to use the shell example to spawn several shells sequentially (open shell1, close shell1, open shell2, close shell2...). The issue is that after closing the first shell, the first keystroke in the second shell is dropped. I think it's related to the note in the example code // NOTE: The goroutine will keep reading until the next keystroke before returning..
How can I do to prevent this behavior?
Thanks!