On 5/24/17 11:40 AM, Stephane CHAZELAS wrote: > 2017-05-24 17:21:33 +0200, Joerg Schilling:
>> Do you have a pointer to the POSIX text that forbids a subshell in this case >> when stdin is redirected? > [...] > > I don't know if you'll find some text that *explicitly* forbids > it to run in a subshell, but you won't find text that *allows* > it (just like you won't see text that allows { a=2; } alone to > run in a subshell environment) "Command substitution, commands that are grouped with parentheses, and asynchronous lists shall be executed in a subshell environment. Additionally, each command of a multi-command pipeline is in a subshell environment; as an extension, however, any or all commands in a pipeline may be executed in the current environment. All other commands shall be executed in the current shell environment." http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_12 -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/