Commits

Anonymous committed 7141652

fixed spurious 'Interrupted system call' errors

Comments (0)

Files changed (1)

 import os, sys
 from PyQt4 import QtCore, QtGui
 from string import split
+import errno
 
 def findInSystemPath(filename):
     '''Search for an executable in the system path'''
         out = ''
         pass
 
-    code = pop.wait()
+    while True:
+        try:
+            code = pop.wait()
+        except OSError, e:
+            if e.errno == errno.EINTR: 
+                continue 
+            else: 
+                raise e
+        else:
+            break
+        
     if code not in expectedexits:
         # Windows does not use uchar return values
         code = code % 256
     except IOError:
         err = ''
 
-    code = pop.wait()
+    while True:
+        try:
+            code = pop.wait()
+        except OSError, e:
+            if e.errno == errno.EINTR: 
+                continue 
+            else: 
+                raise e
+        else:
+            break
+
     if code not in expectedexits:
         # Windows does not use uchar return values
         code = code % 256