diff options
author | Peter Jones <pjones@redhat.com> | 2009-11-06 15:05:55 -0500 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2009-11-09 13:15:20 -0500 |
commit | 78899f07647a5ca7bc40c86434160ed53433e777 (patch) | |
tree | 7f1bfb3395afd7baebb87b92b0f8f1052c9cfa2d /anaconda | |
parent | 6ef3465dd658dfa6c4981b341caa1e1e13f768df (diff) | |
download | anaconda-78899f07647a5ca7bc40c86434160ed53433e777.tar.gz anaconda-78899f07647a5ca7bc40c86434160ed53433e777.tar.xz anaconda-78899f07647a5ca7bc40c86434160ed53433e777.zip |
Allow remote(ish) debugging.
This changes SIGUSR2 to start a debugger that you can telnet to on port
8080. At the moment you need to do "C-] mode char\n" in your telnet
client to get it into character mode instead of line mode.
Diffstat (limited to 'anaconda')
-rwxr-xr-x | anaconda | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -443,6 +443,10 @@ def startSsh(): os.execv("/sbin/sshd", args) sys.exit(1) +def startDebugger(signum, frame): + import epdb + epdb.serve(skip=1) + class Anaconda: def __init__(self): self.intf = None @@ -631,6 +635,12 @@ if __name__ == "__main__": setupEnvironment() + pidfile = open("/var/run/anaconda.pid", "w") + pidfile.write("%s\n" % (os.getpid(),)) + del pidfile + # add our own additional signal handlers + signal.signal(signal.SIGHUP, startDebugger) + # we need to do this really early so we make sure its done before rpm # is imported iutil.writeRpmPlatform() |