freebsd-ports/lang/python23/files/patch-Lib::distutils::spawn.py
Hye-Shik Chang 1efbe2254e - Add a workaround for the net/straw port installation problem
recently introduced by libpthread. The problem was that waitpid(2)
raised EINTR but python's distutils didn't catch it correctly.
- PORTREVISION is bumped to 2, subsequently.
2004-02-24 08:19:54 +00:00

17 lines
711 B
Python

--- Lib/distutils/spawn.py.orig Tue Feb 24 16:55:44 2004
+++ Lib/distutils/spawn.py Tue Feb 24 16:56:01 2004
@@ -144,7 +144,13 @@
# Loop until the child either exits or is terminated by a signal
# (ie. keep waiting if it's merely stopped)
while 1:
- (pid, status) = os.waitpid(pid, 0)
+ try:
+ (pid, status) = os.waitpid(pid, 0)
+ except OSError, exc:
+ import errno
+ if exc.errno == errno.EINTR:
+ continue
+ raise exc
if os.WIFSIGNALED(status):
raise DistutilsExecError, \
"command '%s' terminated by signal %d" % \