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 42706
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh hackers' list <zsh-workers@xxxxxxx>
- Subject: Re: "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups
- Date: Mon, 23 Apr 2018 15:08:43 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180423140903euoutp015b1fd9412d9c46d50a719c0f3cddfc0f~oFeRBxH_W2261222612euoutp01n
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1524492544; bh=KpkGaQS9TYtuPZWA0bbS1BSk0As7Sd6x2WF0720UW3c=; h=Date:From:To:Subject:In-reply-to:References:From; b=XFY6nH3TY1Dvy56jmOSI5OJwNyIyI8PecN7T04n3+jCDowhgS2yCNvkGQJj79Cr3g 3wgmDID1IcCRoltYdqDdB4sZPfnK4OAzrRJBy+c/Hhy8Xpk9qxrhKG6nuqtd+WYMZ9 iP2kr/JUnkoM15lfoZbl5EZ77UriiDZy3xVknPGY=
- In-reply-to: <20180423150312.5e0c0416@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>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: SCSC
- References: <180323221959.ZM27569@torch.brasslantern.com> <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> <180417090926.ZM2456@torch.brasslantern.com> <20180417173558.769503bd@camnpupstephen.cam.scsc.local> <180417105243.ZM2929@torch.brasslantern.com> <20180419104039.7b86ed2b@camnpupstephen.cam.scsc.local> <F3A62E38-24E2-4A62-8E19-F54C9B81E9E5@kba.biglobe.ne.jp> <20180423145238.2c296ec3@camnpupstephen.cam.scsc.local> <20180423150312.5e0c0416@camnpupstephen.cam.scsc.local> <CGME20180423140859eucas1p2591bf1422614209979d4890383268c37@eucas1p2.samsung.com>
On Mon, 23 Apr 2018 15:03:12 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> The main reason I didn't do this is the effect of killpg with signal 0
> isn't actually defined in the Linu man pages or as far as I can see in
> POSIX. But we do this elsewhere so presumably it's a well-known fact
> this works...
After enough poking in manuals, this certainly looks pukka on Linux...
"man killpg" sez
On Linux, killpg() is implemented as a library function that makes the
call kill(-pgrp, sig).
and "man 2 kill" sez
If sig is 0, then no signal is sent, but error checking is still per‐
formed; this can be used to check for the existence of a process ID or
process group ID.
Given it's already all over the shell it's obviously the right thing to
do here, too.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author