|
From: | Martin Jambon |
Subject: | Re: 'wait' in command group in pipeline fails to recognize child process |
Date: | Wed, 23 Jun 2021 15:17:48 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 6/23/21 6:24 AM, Chet Ramey wrote:
On 6/22/21 9:54 PM, Martin Jambon wrote:In the posix definition, a subshell - is not necessarily implemented as a separate process - belongs to a unique shell - is not a shellWhy is it not "a shell?"
Because '$$' doesn't match its process ID.
What is the magic quality that imparts shellness?
'$$' matching the process ID.Posix: '$' shall expand to the same value as that of the current shell. (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_02) Bash: ($$) Expands to the process ID of the shell. (https://www.gnu.org/software/bash/manual/bash.html#Special-Parameters)
I'm not sure why I have to fight over this. It's clearly my misunderstanding. That's why I suggest clarifications in the documentation, if you're interested in creating a better experience for users like me.
[Prev in Thread] | Current Thread | [Next in Thread] |