chiark / gitweb /
implement close command (!)
authorIan Jackson <ian@anarres>
Tue, 13 Feb 2007 20:27:05 +0000 (20:27 +0000)
committerIan Jackson <ian@anarres>
Tue, 13 Feb 2007 20:27:05 +0000 (20:27 +0000)
virt-subproc/VirtSubproc.py

index 97a99896cf0a405eb89af8f808e6661709ec97a3..bc9af88100d8463669a6cba7d684628b1f2efed7 100644 (file)
@@ -59,6 +59,11 @@ def cmd_quit(c, ce):
        cmdnumargs(c, ce)
        raise Quit(0, '')
 
+def cmd_close(c, ce):
+       cmdnumargs(c, ce)
+       if not downtmp: bomb("`close' when not open")
+       cleanup()
+
 def execute_raw(what, instr, *popenargs, **popenargsk):
        debug(" ++ %s" % string.join(popenargs[0]))
        sp = subprocess.Popen(*popenargs, **popenargsk)