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

Re: multios and unnecessary processes



On Mon, Jan 10, 2005 at 07:20:41PM +0000, Bart Schaefer wrote:
> On Jan 10,  5:11pm, Stephane Chazelas wrote:
> } Subject: Re: multios and unnecessary processes
> }
> } However to get back to my initial statement, don't you agree
> } it's a problem that
> } 
> } cmd >&2 >&- >&2
> } 
> } doesn't redirect stdout to stderr but to a pipe to a background
> } process that just echos the output to stderr?
> 
> Yes, that could be considered a bug.  Suggested patch below.
> 
> But under what circumstances would you write that?
[...]

Hi, thanks for the patch (I've not tested it yet).

As I said in a previous mail, I came accross that when trying to
cancel a multios:

{
cmd 2>&1 >&- >&3 | grep -v do-not-want-that-error-message
} 3>&1

Without >&-, cmd's stdout would have gone to the terminal and to
grep, and I just wanted cmd's stderr to go to grep.

At that time, I didn't know of:

(cmd 2>&1 >&3) | grep ...


-- 
Stéphane



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