On 4/24/19 9:07 AM, Andreas Schwab wrote:

>> The /bin/true forces the use of an external command, which means a subshell
>> is forked.  The redirection occurs in the forked subshell.
> 
> But the expansion isn't required to be performed in the subshell.  I
> don't see POSIX having any wording to require one or the other.  

I think the POSIX wording is carefully crafted to allow all behaviors.


> Doing
> the expansion before the fork looks reasonable, even if only to make it
> consistent with builtins.

Is that consistency more valuable than avoiding side effects?

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to