diff options
Diffstat (limited to 'security/pssh/files/patch-psshlib_basethread.py')
| -rw-r--r-- | security/pssh/files/patch-psshlib_basethread.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/security/pssh/files/patch-psshlib_basethread.py b/security/pssh/files/patch-psshlib_basethread.py new file mode 100644 index 000000000000..bdca6d2497d7 --- /dev/null +++ b/security/pssh/files/patch-psshlib_basethread.py @@ -0,0 +1,28 @@ + +$FreeBSD$ + +--- psshlib/basethread.py.orig ++++ psshlib/basethread.py +@@ -1,4 +1,4 @@ +-import color, cStringIO, fcntl, os, select, signal, sys, threading, time, Queue ++import color, cStringIO, errno, fcntl, os, select, signal, sys, threading, time, Queue + from subprocess import Popen, PIPE + + class BaseThread(threading.Thread): +@@ -35,7 +35,15 @@ + timeout = self.flags["timeout"] - (time.time() - start) + if timeout <= 0: + raise Exception("Timeout") +- r, w, e = select.select([ cstdout, cstderr ], [], [], timeout) ++ while True: ++ try: ++ r, w, e = select.select([ cstdout, cstderr ], [], [], timeout) ++ break ++ except select.error, v: ++ if v[0] == errno.EINTR: ++ continue ++ else: ++ raise + try: + for f in r: + chunk = f.read() |
