From: Ian Jackson Date: Tue, 20 Feb 2007 19:54:00 +0000 (+0000) Subject: allow tfd to override stderr/stdout X-Git-Tag: converted-from-bzr~32^3~38 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=25a5ea09653d87c01db10c045324cc414067bc87;p=autopkgtest.git allow tfd to override stderr/stdout --- diff --git a/doc/README.virtualisation-server b/doc/README.virtualisation-server index 1bb7766..3c3835d 100644 --- a/doc/README.virtualisation-server +++ b/doc/README.virtualisation-server @@ -112,6 +112,9 @@ Protocol If this feature is available, execute-debug will be advertised. Only one such plumbing is available. + may be 1 or 2, in which case no output will + be written to the or files. + * Commands copydown copyup diff --git a/virt-subproc/VirtSubproc.py b/virt-subproc/VirtSubproc.py index 2c5e4f6..71b7725 100644 --- a/virt-subproc/VirtSubproc.py +++ b/virt-subproc/VirtSubproc.py @@ -158,11 +158,13 @@ def cmd_execute(c, ce): gobody = " import sys\n" stdout = None + tfd = None if debug_g: (tfd,hfd) = m.groups() gobody += " os.dup2(1,%d)\n" % int(tfd) stdout = int(hfd) for ioe in range(3): + if ioe == tfd: continue gobody += " setfd(%d,'%s',%d)\n" % ( ioe, ce[ioe+2], ioe>0 ) gobody += " os.chdir(urllib.unquote('" + ce[5] +"'))\n"