[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lastpipe doesn't lastpipe when stdin (fd 0) is closed

From: Chet Ramey
Subject: Re: lastpipe doesn't lastpipe when stdin (fd 0) is closed
Date: Fri, 18 Dec 2020 10:47:01 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.5.1

On 12/16/20 2:28 PM, Tomas Janousek wrote:

bash-5.1 (and judging from git blame, all versions that ever supported lastpipe, so 4.2+) fails to honor lastpipe when run without fd 0:

Thanks for the report.

The issue seems to be that execute_cmd.c:execute_pipeline insists on saving/restoring stdin which obviously fails when there's no stdin open at all:

That's not quite it, at least for the general case, but you're on the right
track. I'll look at changing this for the next version.


``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/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]