zsh-workers
 help / color / mirror / code / Atom feed
* "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups
@ 2018-03-23 16:16 Stephane Chazelas
  2018-03-23 23:36 ` Bart Schaefer
  2018-03-25  7:38 ` Stephane Chazelas
  0 siblings, 2 replies; 41+ messages in thread
From: Stephane Chazelas @ 2018-03-23 16:16 UTC (permalink / raw)
  To: Zsh hackers list

From
https://unix.stackexchange.com/questions/411688/zsh-cant-input-to-terminal-when-piping-stdin-and-stdout-with-variable-command-t

$ echo | ps -j $(:) | cat | cat | cat
  PID  PGID   SID TTY          TIME CMD
 4858  4858  4858 pts/4    00:00:02 zsh
23813 23813  4858 pts/4    00:00:00 zsh
23895 23895  4858 pts/4    00:00:00 ps
23896 23896  4858 pts/4    00:00:00 cat
23897 23897  4858 pts/4    00:00:00 cat
23898 23898  4858 pts/4    00:00:00 cat

See how they all run in different process groups (they should
all be in the same one, same job).

Note that the conditions to reproduce the problem seem to be
quite specific:

- the first pipeline component must be a builtin or compound command
- the second component must have a command substitution in the
  arguments (OK when in targets of redirections).

(tested with git head on Debian amd64)

-- 
Stephane


^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2018-05-01  9:30 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23 16:16 "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups Stephane Chazelas
2018-03-23 23:36 ` Bart Schaefer
2018-03-24  5:19   ` Bart Schaefer
2018-03-24  8:05     ` Joey Pabalinas
2018-03-24 17:34       ` Stephane Chazelas
2018-03-24 22:23         ` Bart Schaefer
2018-03-25  7:00           ` Stephane Chazelas
2018-03-25  8:26             ` Stephane Chazelas
2018-03-25  7:48           ` Stephane Chazelas
2018-03-25 18:09             ` Stephane Chazelas
2018-03-27 10:17         ` Stephane Chazelas
2018-03-24 22:09       ` Bart Schaefer
2018-04-10 11:45         ` Peter Stephenson
2018-04-10 13:59           ` Peter Stephenson
2018-04-11 22:10             ` Bart Schaefer
2018-04-12 16:23               ` Peter Stephenson
2018-04-15 16:23                 ` Stephane Chazelas
2018-04-15 17:38                   ` Bart Schaefer
2018-04-15 18:58                     ` Stephane Chazelas
2018-04-17  5:39                       ` Bart Schaefer
2018-04-17  9:19                         ` Peter Stephenson
2018-04-17 16:09                           ` Bart Schaefer
2018-04-17 16:27                             ` Bart Schaefer
2018-04-17 16:35                             ` Peter Stephenson
2018-04-17 17:52                               ` Bart Schaefer
2018-04-19  9:40                                 ` Peter Stephenson
2018-04-20  9:28                                   ` Forking earlier for background code Peter Stephenson
2018-04-20 10:01                                     ` Peter Stephenson
2018-04-20 12:54                                       ` Vin Shelton
     [not found]                                         ` <CGME20180420132008eucas1p1c297624e870975cd892c74254970faab@eucas1p1.samsung.com>
2018-04-20 13:20                                           ` Peter Stephenson
2018-04-20 16:01                                             ` Vin Shelton
2018-04-23  8:29                                     ` Peter Stephenson
2018-05-01  9:23                                       ` Peter Stephenson
     [not found]                                   ` <F3A62E38-24E2-4A62-8E19-F54C9B81E9E5@kba.biglobe.ne.jp>
2018-04-23 13:52                                     ` "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups Peter Stephenson
2018-04-23 14:03                                       ` Peter Stephenson
     [not found]                                         ` <CGME20180423140859eucas1p2591bf1422614209979d4890383268c37@eucas1p2.samsung.com>
2018-04-23 14:08                                           ` Peter Stephenson
2018-04-23 15:29                                         ` Jun T.
2018-04-18  6:29                           ` Stephane Chazelas
2018-04-18 16:33                             ` Bart Schaefer
2018-04-10  9:53   ` Peter Stephenson
2018-03-25  7:38 ` Stephane Chazelas

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).