Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: detect pipe



On Sun, Feb 14, 2021 at 9:31 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
>
> Closing stdin is a bad idea, as this can break stdout redirection,
> and this may be out of control of the commands. See
>
>   https://sourceware.org/bugzilla/show_bug.cgi?id=682

IMO that's just silly.  If stdin/stdout were never supposed to be
closed, why has the standard shell had <&- and >&- for its entire
existence?  Why wouldn't those be syntax errors when a file descriptor
number is not provided if you're never supposed to use them?




Messages sorted by: Reverse Date, Date, Thread, Author