zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: [PATCH3] Re: avoid closed stdin() in zle widgets
Date: Fri, 16 Jun 2017 20:03:57 -0700	[thread overview]
Message-ID: <170616200357.ZM27935@torch.brasslantern.com> (raw)
In-Reply-To: <20170615084244.GB2416@chaz.gmail.com>

On Jun 15,  9:42am, Stephane Chazelas wrote:
}
} In other words, I would certainly not want zsh to refuse to <&-
} just like I would not want close(0) in C to fail.
} 
} The case of zle widgets running commands with stdin close was
} not a case where the user requested stdin to be closed.

So, just being contrarian at this point, if _main_complete were to have
done "exec <&-" that would be OK, but because the C code does it we
have to patch it.

The point being that the completion system does LOTS of things that the
user didn't explicitly request, but requested implicitly by choosing to
use it.  It traps various signals, throws away error output, for some
commands even runs "su" or "sudo" -- although the latter are probably
the best analogy for this because we added _comp_priv_prefix.


      reply	other threads:[~2017-06-17  3:03 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
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 [this message]

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=170616200357.ZM27935@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).