Update of /cvsroot/python/python/dist/src/Lib/distutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29352 Modified Files: spawn.py Log Message: Make _spawn_posix be ready for EINTR. waitpid(2) can be interrupted by SIGCHLD or sth because no signal is masked before. This fixes an optimized installation problem on FreeBSD libpthread. Index: spawn.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/spawn.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** spawn.py 21 Nov 2002 20:41:07 -0000 1.16 --- spawn.py 24 Feb 2004 23:54:17 -0000 1.17 *************** *** 145,149 **** # (ie. keep waiting if it's merely stopped) while 1: ! (pid, status) = os.waitpid(pid, 0) if os.WIFSIGNALED(status): raise DistutilsExecError, \ --- 145,156 ---- # (ie. keep waiting if it's merely stopped) while 1: ! try: ! (pid, status) = os.waitpid(pid, 0) ! except OSError, exc: ! import errno ! if exc.errno == errno.EINTR: ! continue ! raise DistutilsExecError, \ ! "command '%s' failed: %s" % (cmd[0], exc[-1]) if os.WIFSIGNALED(status): raise DistutilsExecError, \