You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
delegator.chain("printf '' | awk '{print $1}'") would hang, while delegator.run("printf '' | awk '{print $1}'") wouldn't.
It seems that the command would block in pexpect:
^C---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-3-fc2320a6bab7> in <module>
----> 1 delegator.chain("printf '' | awk '{print $1}'")
~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/delegator.py in chain(command, timeout, cwd, env)
308 c.subprocess.sendeof()
309
--> 310 data = c.out
311
312 return c
~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/delegator.py in out(self)
126 self.__out = self.std_out.read()
127 else:
--> 128 self.__out = self._pexpect_out
129
130 return self.__out
~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/delegator.py in _pexpect_out(self)
114 result += self.subprocess.after
115
--> 116 result += self.subprocess.read()
117 return result
118
~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pexpect/spawnbase.py in read(self, size)
439 if size < 0:
440 # delimiter default is EOF
--> 441 self.expect(self.delimiter)
442 return self.before
443
~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pexpect/spawnbase.py in expect(self, pattern, timeout, searchwindowsize, async_, **kw)
339 compiled_pattern_list = self.compile_pattern_list(pattern)
340 return self.expect_list(compiled_pattern_list,
--> 341 timeout, searchwindowsize, async_)
342
343 def expect_list(self, pattern_list, timeout=-1, searchwindowsize=-1,
~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pexpect/spawnbase.py in expect_list(self, pattern_list, timeout, searchwindowsize, async_, **kw)
367 return expect_async(exp, timeout)
368 else:
--> 369 return exp.expect_loop(timeout)
370
371 def expect_exact(self, pattern_list, timeout=-1, searchwindowsize=-1,
~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pexpect/expect.py in expect_loop(self, timeout)
111 incoming = spawn.read_nonblocking(spawn.maxread, timeout)
112 if self.spawn.delayafterread is not None:
--> 113 time.sleep(self.spawn.delayafterread)
114 if timeout is not None:
115 timeout = end_time - time.time()
KeyboardInterrupt:
My delegator version is 0.1.1
The text was updated successfully, but these errors were encountered:
delegator.chain("printf '' | awk '{print $1}'")
would hang, whiledelegator.run("printf '' | awk '{print $1}'")
wouldn't.It seems that the command would block in
pexpect
:My delegator version is
0.1.1
The text was updated successfully, but these errors were encountered: