|
From: | Chet Ramey |
Subject: | Re: bug in bash |
Date: | Mon, 13 May 2024 15:23:55 -0400 |
User-agent: | Mozilla Thunderbird |
On 5/12/24 10:00 AM, Oğuz wrote:
On Sun, May 12, 2024 at 4:33 PM Andreas Schwab <schwab@linux-m68k.org> wrote:Since the redirection fails and the cat command is never started, bash doesn't switch the terminal process groupIt 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.
Command substitutions and process substitutions run in the same process group as the shell performing the word expansions. This is how ksh93 does it as well (zsh, by contrast, performs the setpgid in the process forked to run the process substitution). -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
[Prev in Thread] | Current Thread | [Next in Thread] |