On Sun, May 12, 2024 at 4:33 PM Andreas Schwab <sch...@linux-m68k.org> wrote:
> Since the redirection fails and the cat command is never started, bash
> doesn't switch the terminal process group

It does on my computer:

554   ioctl(255, TIOCSPGRP, [554])      = 0
553   execve("/usr/bin/wc", ["wc", "-l"], 0x55706d7bac10 /* 30 vars */
<unfinished ...>
554   +++ exited with 1 +++

But it doesn't change the process group ID of `wc' to its PID, so it
ends up in the foreground process group with bash. See:

$ cat <(bash -c 'enable setpgid; setpgid $$ $$; wc -l') <bk
bash: bk: No such file or directory
$ wc: 'standard input': Input/output error
$

Reply via email to