Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: XTRACE output -- I thought we'd fixed this?



On May 23, 10:14am, Peter Stephenson wrote:
} Subject: Re: XTRACE output -- I thought we'd fixed this?
}
} On Mon, 16 May 2011 14:28:43 -0700
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > Stderr redirection isn't supposed to redirect the xtrace descriptor
} > unless you use a { ... } construct.  There's even this in
} > exec.c:execcmd():
} > 
} >     /* Make a copy of stderr for xtrace output before redirecting */
} 
} I've been very confused by this, so it's quite possible something is
} still wrong.

The code to create a newxtrerr exec.c after line 2867 does get run,
and then the redirections happen, but then at line 3082 after closing
all the mnodes, we restore xtrerr to stderr again.  This was added
in the same patch that introduced the newxtrerr copy of xtrerr.  The
www.zsh.org web server is down so I can't check the archive; commit
log says:

revision 1.132
date: 2008/06/11 09:27:55;  author: pws;  state: Exp;  lines: +8 -7
25145: make sure XTRACE output is redirected with stderr

At this point, I'm also confused.  It appears zsh is deliberately
redirecting xtrace with stderr, whereas bash appears not to do so.



Messages sorted by: Reverse Date, Date, Thread, Author