[Python-checkins] python/dist/src/Lib tempfile.py,1.57,1.58

aleax at users.sourceforge.net aleax at users.sourceforge.net
Sun Nov 9 11:44:11 EST 2003


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv12851
Modified Files:
	tempfile.py 
Log Message:
fixed wrong error checking on fcntl call as per SF bug # 821896
(same as commit of Sun Nov 2 to the release23-maint branch)
Index: tempfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tempfile.py,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** tempfile.py	12 Oct 2003 17:37:01 -0000	1.57
--- tempfile.py	9 Nov 2003 16:44:09 -0000	1.58
***************
*** 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

AltStyle によって変換されたページ (->オリジナル) /