Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups
- X-seq: zsh-workers 42678
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups
- Date: Wed, 18 Apr 2018 07:29:20 +0100
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zs77e5iVMbfhMztMZO0LDRGm+kfKfx0gR9NAaU56mIE=; b=MAE9+EcaFXi+ZpNgEYtOZM2B31TL64wXcLPxytB2nYdnHZpz+uVQJbjldXg+na42jd +jk5UqdQ6AeEX0/Ols3rHGFHFVaTD7z/8C9e0y7me5JBdrJKXXDNI4qpClhXPhSA2sp0 HiybyEwYa5nvytPWNaS55fBCxlpu8YfVtjoFDhrxSIjvgVZtrq6tQ79ubWqTVwJxiG6A AEkQrgvofavINjIzvqLakpEeLBZdvaqSpkQeFlM/Wa2+ZWwLHLh7xYQWHWck20ver9KZ Bl1AV8eD9B4G0MSFRVEdomvn3tuKtvJb046j93iLbXGmhWv43QSdg4upZOwh5VIebVVy hPbA==
- In-reply-to: <20180417101947.5fd347df@camnpupstephen.cam.scsc.local>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mail-followup-to: Peter Stephenson <p.stephenson@xxxxxxxxxxx>, zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <180324150945.ZM32251@torch.brasslantern.com> <20180410124545.13fccd5d@camnpupstephen.cam.scsc.local> <20180410145926.64c4f671@camnpupstephen.cam.scsc.local> <180411151025.ZM19332@torch.brasslantern.com> <20180412172342.52df6b10@camnpupstephen.cam.scsc.local> <20180415162326.GA12549@chaz.gmail.com> <CAH+w=7ZVx_uJQkJgSn-4wdyfRece6AADPWb+S=F1q2oJWai67w@mail.gmail.com> <20180415185804.GB12549@chaz.gmail.com> <180416223910.ZM32002@torch.brasslantern.com> <20180417101947.5fd347df@camnpupstephen.cam.scsc.local>
2018-04-17 10:19:47 +0100, Peter Stephenson:
[...]
> > % echo ${foo::=bar} & echo $foo
> > [1] 31940
> > bar
> > % bar
[...]
> It certainly looks rather unexpected. I think most of us staring at it
> would assume the entire command line was evaluated in the background.
> It's hard to believe anyone is deliberately relying on this behaviour.
> I think it would be fine to change with a note about the
> incompatibility.
[...]
But then again (as already mentioned in 42527)
$ echo ${foo::=bar} | echo $foo
bar
is equally surprising to me (and at the root of most of the
problems in this thread as the expansions are not done in the
job's process group).
foo | bar
to me is like
foo & bar
except for the pipe() that connects them.
I suspect if you reuse "time" code, that won't address this
case.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author