-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hitting ^D in a pause causes endless printing of 'exit' #8
Comments
I'm reminded of an old Tommy Cooper joke. |
"Doctor, I can't pronounce my F's, T's and H's." Probably a different one. |
Interesting - am investigating a bug in a build which happens only on someone's machine here, and get endless printing of ^C repro on: Doesn't happen on: |
So, I got this (when playing with mounting in an unprivileged container and therefore getting a pause point when it fails) and had a thought about debugging.
So is something happening inside pexpect? |
Yes. I can only use apt-get, not pip. On Wed, May 7, 2014 at 8:33 PM, aidanhs notifications@github.com wrote:
|
imiell@lp01728: Pexpect Copyright (c) 2008 Noah Spurrier My money would be on some kind of pexpect oddness then. On Wed, May 7, 2014 at 8:35 PM, Ian Miell ian.miell@gmail.com wrote:
|
Bingo. The below code reproduces it reliably - just hit ctrl+D import fdpexpect
import pty
import os
import sys
def proc_start(cmd_list):
(child_pid, fd) = pty.fork()
if child_pid == 0:
# The first item of the list in the second argument is the name
# of the new program
try:
os.execvp(cmd_list[0], cmd_list)
except OSError:
print "Failed to exec"
sys.exit(1)
else:
return fd
fd = proc_start(['/bin/bash'])
c = fdpexpect.fdspawn(fd)
c.interact() |
Raised in pexpect/pexpect#49 |
Keep on making this mistake and it locks up my ssh sessions, which is a pain.
The text was updated successfully, but these errors were encountered: