diff options
author | Jeff Quast <contact@jeffquast.com> | 2014-11-22 21:34:00 -0800 |
---|---|---|
committer | Jeff Quast <contact@jeffquast.com> | 2014-11-22 21:43:48 -0800 |
commit | cf92c744b89aa334f8b8fce029d7d1837ec2e769 (patch) | |
tree | 35cff476ca3251a35eb9f167af6c25bd5625c656 | |
parent | d455323193f358f0cdfcd8e880e8f82735ca9caf (diff) | |
download | pexpect-fix-occasionally-failing-solaris-setwinsize.tar.gz |
Fix occasionally failing Solaris setwinsize()fix-occasionally-failing-solaris-setwinsize
Although this is expected to always happen from the parent
process, it does intermittently occur on the child process:
https://teamcity-master.pexpect.org/viewLog.html?buildId=561&buildTypeId=Pexpect_SunosBuild&tab=buildLog#_focus=1292
A similar issue is found in tmux, which is referenced inline.
( There are other errors found in this build log -- but I
suspect it is due to the forked test runner. )
-rw-r--r-- | pexpect/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pexpect/__init__.py b/pexpect/__init__.py index 8e2b21e..45fed56 100644 --- a/pexpect/__init__.py +++ b/pexpect/__init__.py @@ -676,6 +676,12 @@ class spawn(object): except IOError as err: if err.args[0] not in (errno.EINVAL, errno.ENOTTY): raise + except OSError as err: + # setwinsize (intermittently!) fails on Solaris *from the + # child* process, raising EXNIO. See for example in tmux, + # http://sourceforge.net/p/tmux/tickets/158/?limit=100 + if err.args[0] not in (errno.EXNIO,): + raise # disable echo if spawn argument echo was unset if not self.echo: |