From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Stephane Chazelas <stephane.chazelas@gmail.com>
Cc: zsh-workers@zsh.org, Eric Cook <llua@gmx.com>
Subject: Re: [PATCH2] Re: avoid closed stdin() in zle widgets
Date: Mon, 12 Jun 2017 14:34:49 +0000 [thread overview]
Message-ID: <1497278089.1853864.1006670720.0A8DB74D@webmail.messagingengine.com> (raw)
In-Reply-To: <20170612060554.GA4709@chaz.gmail.com>
Stephane Chazelas wrote on Mon, 12 Jun 2017 07:05 +0100:
> 2017-06-12 00:15:20 -0400, Eric Cook:
> [...]
> > > in zle widgets, stdin currently appears to be closed. That's
> > > generally not a good idea to close fds 0, 1, 2 as many commands
> > > are confused when the files they open suddenly become their
> > > stdin/stdout/stderr because the first free fd is 0/1/2.
> [...]
> > It is documented to work like that in zshzle
> [...]
>
> Well spotted. Thanks. (I also left a diff by mistake for an
> unrelated issue discussed earlier on. Sorry about that).
>
> New patch:
>
> diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
> index b65e3be..bd0252f 100644
> --- a/Doc/Zsh/zle.yo
> +++ b/Doc/Zsh/zle.yo
> @@ -750,12 +750,12 @@ sect(User-Defined Widgets)
Incompatible changes should be mentioned in NEWS or README.
I'm not convinced that the change should be made. Devil's advocate
argues that this is a bug in dircolors(1), so (a) as an immediate
workaround, people with a buggy dircolors(1) command should redirect
stdin from /dev/null when invoking it, (b) those people should fix their
dircolors(1) command to not assume fd 0 is open.
Daniel
next prev parent reply other threads:[~2017-06-12 14:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-11 18:20 [PATCH] " Stephane Chazelas
2017-06-12 4:15 ` Eric Cook
2017-06-12 6:05 ` [PATCH2] " Stephane Chazelas
2017-06-12 14:34 ` Daniel Shahaf [this message]
2017-06-12 15:10 ` Stephane Chazelas
2017-06-12 15:19 ` [PATCH3] " Stephane Chazelas
2017-06-12 15:34 ` Daniel Shahaf
2017-06-12 16:09 ` Bart Schaefer
2017-06-12 19:02 ` Stephane Chazelas
2017-06-14 22:44 ` Bart Schaefer
2017-06-15 8:42 ` Stephane Chazelas
2017-06-17 3:03 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1497278089.1853864.1006670720.0A8DB74D@webmail.messagingengine.com \
--to=d.s@daniel.shahaf.name \
--cc=llua@gmx.com \
--cc=stephane.chazelas@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).