Initial work to make paramiko connections work under v2

This commit is contained in:
James Cammarata 2015-04-24 02:47:56 -04:00
parent 8c08f1b302
commit 8574d40b98
7 changed files with 124 additions and 167 deletions

View file

@ -87,21 +87,10 @@ class TaskQueueManager:
self._workers = []
for i in range(self._options.forks):
# duplicate stdin, if possible
new_stdin = None
if fileno is not None:
try:
new_stdin = os.fdopen(os.dup(fileno))
except OSError:
# couldn't dupe stdin, most likely because it's
# not a valid file descriptor, so we just rely on
# using the one that was passed in
pass
main_q = multiprocessing.Queue()
rslt_q = multiprocessing.Queue()
prc = WorkerProcess(self, main_q, rslt_q, loader, new_stdin)
prc = WorkerProcess(self, main_q, rslt_q, loader)
prc.start()
self._workers.append((prc, main_q, rslt_q))