You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems it is possible in certain situations for the child_fd to be closed before the windowsize can be set. I tried putting in a print before, and the file descriptor looks OK (i.e. it's not -1).
importpexpectpexpect.spawn("/bin/true")
Relevant stack trace:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/export/home/rbj/.local/lib/python2.6/site-packages/pexpect/__init__.py", line 511, in __init__
self._spawn(command, args)
File "/export/home/rbj/.local/lib/python2.6/site-packages/pexpect/__init__.py", line 674, in _spawn
self.setwinsize(24, 80)
File "/export/home/rbj/.local/lib/python2.6/site-packages/pexpect/__init__.py", line 1602, in setwinsize
fcntl.ioctl(self.fileno(), TIOCSWINSZ, s)
IOError: [Errno 6] No such device or address
This is a corner case that probably doesn't affect many users (if any). You can download a Solaris 11.2 VirtualBox image if you want to test it yourself. I have the CPU throttled to 50% on my VM - that might make the race condition more obvious.
The text was updated successfully, but these errors were encountered:
I guess if the child process finishes very quickly, the pty might be destroyed before the parent tries to act on it. We should probably catch and silence that errno.
It seems it is possible in certain situations for the
child_fd
to be closed before the windowsize can be set. I tried putting in a print before, and the file descriptor looks OK (i.e. it's not -1).Relevant stack trace:
This is a corner case that probably doesn't affect many users (if any). You can download a Solaris 11.2 VirtualBox image if you want to test it yourself. I have the CPU throttled to 50% on my VM - that might make the race condition more obvious.
The text was updated successfully, but these errors were encountered: