[Python-checkins] python/dist/src/Lib pty.py,1.11,1.12
loewis@users.sourceforge.net
loewis@users.sourceforge.net
Sun, 28 Jul 2002 02:42:59 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv15076
Modified Files:
pty.py
Log Message:
Patch #581705: Catch OSError, termios.error in spawn. 2.2 bugfix candidate.
Index: pty.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pty.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** pty.py 29 May 2001 06:06:54 -0000 1.11
--- pty.py 28 Jul 2002 09:42:57 -0000 1.12
***************
*** 155,162 ****
if pid == CHILD:
apply(os.execlp, (argv[0],) + argv)
! mode = tty.tcgetattr(STDIN_FILENO)
! tty.setraw(STDIN_FILENO)
try:
_copy(master_fd, master_read, stdin_read)
! except IOError:
! tty.tcsetattr(STDIN_FILENO, tty.TCSAFLUSH, mode)
--- 155,167 ----
if pid == CHILD:
apply(os.execlp, (argv[0],) + argv)
! try:
! mode = tty.tcgetattr(STDIN_FILENO)
! tty.setraw(STDIN_FILENO)
! restore = 1
! except tty.error: # This is the same as termios.error
! restore = 0
try:
_copy(master_fd, master_read, stdin_read)
! except (IOError, OSError):
! if restore:
! tty.tcsetattr(STDIN_FILENO, tty.TCSAFLUSH, mode)