Eliminate kernel warning when running tests on FreeBSD

pexpect had a hack to work around some old buggy platforms, and as a
result of the hack running the tests on FreeBSD produced a stream of
kernel warnings in the system log:

  Feb 5 17:19:11 feynman kernel: WARNING pid 11323 (python2.7):
    ioctl sign-extension ioctl ffffffff80087467

The hack has now been removed upstream, so remove it here too.

llvm.org/pr18749

llvm-svn: 201603
This commit is contained in:
Ed Maste 2014-02-18 21:33:10 +00:00
parent 65ec94e348
commit 63f358baad
1 changed files with 4 additions and 10 deletions

View File

@ -1437,17 +1437,11 @@ class spawn (object):
applications like vi or curses -- applications that respond to the
SIGWINCH signal. """
# Check for buggy platforms. Some Python versions on some platforms
# (notably OSF1 Alpha and RedHat 7.1) truncate the value for
# termios.TIOCSWINSZ. It is not clear why this happens.
# These platforms don't seem to handle the signed int very well;
# yet other platforms like OpenBSD have a large negative value for
# TIOCSWINSZ and they don't have a truncate problem.
# Newer versions of Linux have totally different values for TIOCSWINSZ.
# Note that this fix is a hack.
# Some very old platforms have a bug that causes the value for
# termios.TIOCSWINSZ to be truncated. There was a hack here to work
# around this, but it caused problems with newer platforms so has been
# removed. For details see https://github.com/pexpect/pexpect/issues/39
TIOCSWINSZ = getattr(termios, 'TIOCSWINSZ', -2146929561)
if TIOCSWINSZ == 2148037735L: # L is not required in Python >= 2.2.
TIOCSWINSZ = -2146929561 # Same bits, but with sign.
# Note, assume ws_xpixel and ws_ypixel are zero.
s = struct.pack('HHHH', r, c, 0, 0)
fcntl.ioctl(self.fileno(), TIOCSWINSZ, s)