[Python-checkins] python/dist/src/Lib tempfile.py,1.56,1.56.4.1

aleax at users.sourceforge.net aleax at users.sourceforge.net
Sun Nov 2 13:11:56 EST 2003


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv21988

Modified Files:
      Tag: release23-maint
	tempfile.py 
Log Message:
fixed wrong error checking on fcntl call as per SF bug # 821896



Index: tempfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tempfile.py,v
retrieving revision 1.56
retrieving revision 1.56.4.1
diff -C2 -d -r1.56 -r1.56.4.1
*** tempfile.py	22 Jul 2003 02:50:01 -0000	1.56
--- tempfile.py	2 Nov 2003 18:11:53 -0000	1.56.4.1
***************
*** 48,53 ****
  else:
      def _set_cloexec(fd):
!         flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
!         if flags >= 0:
              # flags read successfully, modify
              flags |= _fcntl.FD_CLOEXEC
--- 48,54 ----
  else:
      def _set_cloexec(fd):
!         try: flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
!         except IOError: pass
!         else:
              # flags read successfully, modify
              flags |= _fcntl.FD_CLOEXEC





More information about the Python-checkins mailing list