Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: fd used for saving redirected fds leaked to child processes
- X-seq: zsh-workers 41788
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: fd used for saving redirected fds leaked to child processes
- Date: Fri, 29 Sep 2017 15:06:24 +0000
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=/zHNH0 igcVIHtg9PuXTkmZhBvHZ2tX40d+XpHGhS21E=; b=smUiGGe0KJf+rDmbyNq6Ih 3vmpUE+QHSCQfxpHev5od/RwmsKk6DU9G4oLRgTbAviUpN8Se6GWekH6RLagAIRV wGM/oQ6t5Siz++pAGSQHJ0wCLwdMKOUfkuK+XZpRRRP0EYp0maO1/5L/ikWMQwxv qzXQOzCccYfirC9n1DUQaxQbTRAcXqEl8u7xSMJKM/QyqL7JF0ZfQI4kBPGN+orK LuSocCY/YJzAeh2RewLGi/uBnAJIx/7UIWx30u9QiPWewh82u8y6OBMzJZiGtr2/ hgBbZnWXxf0TGnxpa6jL6GaFcXms7KWb8Y6PfS5w6HqohD1OoIE2OjTI7L9MjVpw ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=/zHNH0 igcVIHtg9PuXTkmZhBvHZ2tX40d+XpHGhS21E=; b=QUz9KsbjjfMzh5m5gNuvK1 2yUDjpj3vIOrlrXN08kcqWGqnnHTaFcCtjNsaB857jSwJ1eQb8VWd0chCDQ0rg9x 4IvkSOfkRa1e6EOSWbye6sDzWFiD5ZTabP3ygOCuz6rOoZT8AvafwpGlsumpT5vP Ztdg/uKzla8mTgyaDncrJFEny0/qspUF6iRBuKFeLr49muinF1l3oRVX1VMVqh3p PC2ialUYgp1JgTnTHbuQWYwW4Q3dOipIvZIOc0gKuU426Up9uj1Ez6VmBHprIDK1 vq8ZbqdP5OY2RJCJys8vlmUlDp32JBxZEcJ1qL8boKoHsizx+tpkXZH9UycO6oFA ==
- In-reply-to: <20170814201939.22ba0dcb@ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20170813161207.GA6530@chaz.gmail.com> <20170813194939.7a96bc4b@ntlworld.com> <CGME20170813214600epcas4p4764cb5399e27ff0e52a1936ecdf49346@epcas4p4.samsung.com> <CAH+w=7Y3OaN0JJOo=jG-G+yRZ9NUqbNCGZBw6b452_nOWUAKMA@mail.gmail.com> <20170814100956.363c7ea8@pwslap01u.europe.root.pri> <CAH+w=7bUMdLYFd0aBE=xFCizZvkK6Msj93fOAFanF5vZO7QsKg@mail.gmail.com> <20170814201939.22ba0dcb@ntlworld.com>
Peter Stephenson wrote on Mon, 14 Aug 2017 20:19 +0100:
> On Mon, 14 Aug 2017 07:49:52 -0700
> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > On Mon, Aug 14, 2017 at 2:09 AM, Peter Stephenson
> > <p.stephenson@xxxxxxxxxxx> wrote:
> > >
> > > We need to expose the entire hierarchy for this particular case, but
> > > that looks like a stack or a linked list, which seems a little
> > > heavyweight for this case.
> >
> > Another flag in the fdtable array?
>
> This does that --- this looks easy. It didn't seem convenient to
> optimise, since once one set of saved fds is restored, exposing any in
> an enclosing scope, there's no way of working out which the new highest
> number is without an exhaustive search.
This patch introduces a new warning:
% Src/zsh -fc ': 3>&1'
1: Src/exec.c:2330: Saved file descriptor not marked as internal
It's commit ddb86759012992fa6471bd738f906a4ed434b69f (the log message
doesn't include the X-Seq).
Found this via z-sy-h's "make quiet-test".
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author