cmdnumargs(c, ce)
if downtmp: bomb("`open' when already open")
downtmp = caller.hook_open()
+ if downtmp is None:
+ downtmp = execute('mktemp -t -d', downp=True, outp=True)
debug("down = %s, downtmp = %s" % (string.join(down), downtmp))
return [downtmp]
debug("cleanup...");
sethandlers(signal.SIG_DFL)
cleaning = True
- if downtmp: caller.hook_cleanup()
+ if downtmp:
+ if not 'revert' in caller.hook_capabilities():
+ execute('rm -rf --', [downtmp], downp=True)
+ caller.hook_cleanup()
cleaning = False
downtmp = False
def hook_open():
global downtmp
vsp.execute('true', downp=True)
- downtmp = vsp.execute('mktemp -t -d', downp=True, outp=True)
- return downtmp
+ return None
def hook_cleanup():
- vsp.execute('rm -rf --', [downtmp], downp=True)
+ pass
def hook_forked_inchild():
pass