Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: exec >& >(tee hello)
- X-seq: zsh-workers 31185
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: exec >& >(tee hello)
- Date: Thu, 28 Mar 2013 17:57:13 -0400
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201210; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=EkSIDEjgK0TDkwGq//mRacwzzI/fq9RHwq+NWkwDSd0=; b=u/R2E2twHm4d7v+mDbq0csUgUVk/x5yNK00jO3PiF2Yv7jpiGGHA/vSAVJPTLMp0SLYoZKDphZrHKYjc24FgRrYeCDuem3/ZCtGUUY9XV6OHWnC0f/RyV+dvlvcLoEYOsO70UU0cERZhWpWAEV4We28zg3Q3iP2nmeuoyxC34wI=;
- In-reply-to: <130328084639.ZM28782@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1364325715.29901.140661209502305.67203343@webmail.messagingengine.com> <130328084639.ZM28782@torch.brasslantern.com>
On 2013-03-28 at 08:46 -0700, Bart Schaefer wrote:
> On Mar 26, 3:21pm, Anthony Heading wrote:
> }
> } On zsh (5.0 and 4.2.6 - rhel5 x64), this command hangs:
> } zsh -c 'exec >& >(tee hello)'
> } It seems to work OK with bash.
>
> Define "work".
>
> Zsh is waiting for "tee hello" to finish. It's part of the current
> command line, and nothing was put in the background, so the current
> command is in the foreground until all parts of it finish. From a
> job management perspective this is the same as
>
> { exec >& } | tee hello
>
> Perhaps
>
> exec >& >(tee hello &)
Okay, now I'm confused.
See, this works:
zsh -c 'exec > >(tee hello); echo foo'
zsh -c 'exec > >(tee hello)'
It's only when you try to use >& to redirect both stdout and stderr that
it fails/hangs.
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author