I/O error from pty

I’m getting an intermittent error when using pty.

Occasionally a getc (after select already indicates input is
ready) will return an I/O error (Errno::EIO I think).

I’m simply invoking telnet and passing in a userid and fake password,
and catching the prompts and the error messages.

Any ideas why this EIO error might happen?

It’s the same testcase repeated over and over that has the

I won’t post the testcase, as the code calls other code… I’d
end up posting hundreds of lines.

I’ll try to simplify it and post later.

Thanks for any help…