From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2306 invoked by alias); 25 Oct 2015 18:44:55 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36961 Received: (qmail 3533 invoked from network); 25 Oct 2015 18:44:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [86.6.158.222] X-Spam: 0 X-Authority: v=2.1 cv=UKUgZ3ry c=1 sm=1 tr=0 a=2SBOh4l1h08DI0L+aujZyQ==:117 a=2SBOh4l1h08DI0L+aujZyQ==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=34LRdB1ysSbUwRZ70cgA:9 a=CjuIK1q_8ugA:10 Date: Sun, 25 Oct 2015 18:44:46 +0000 From: Peter Stephenson To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: Mangement of fdtable[] Message-ID: <20151025184446.5bb5ae63@ntlworld.com> In-Reply-To: <151024140539.ZM31653@torch.brasslantern.com> References: <151015172252.ZM30709@torch.brasslantern.com> <20151024191621.7f6d71bf@ntlworld.com> <151024114352.ZM27626@torch.brasslantern.com> <20151024201439.35cb8bf1@ntlworld.com> <20151024204341.5c15808d@ntlworld.com> <151024140539.ZM31653@torch.brasslantern.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 24 Oct 2015 14:05:39 -0700 Bart Schaefer wrote: > On Oct 24, 8:43pm, Peter Stephenson wrote: > } Subject: Re: Mangement of fdtable[] > } > } That's not good enough. For zsocket, it needs to be an FDT_EXTERNAL > } because we want the user to determine whne it gets closed just the same > } as with ztcp, but in this case it can only be closed with standard shell > } syntax --- I've clarified this. > > OK, so the next question is, if the descriptor is going to be closed by > some external library (again I refer to db_gdbm.c), how should the > module mark it as no longer used in fdtable? Poke FDT_UNUSED directly? I guess so, it's just the rest of zclose() apart from the close itself. I'm wondering if really we should be using bit fields rather than categories --- so there's a bit for close when we call closem(), a bit for this is managed by a module, a bit for external, etc. That probably scales a lot better than what we've currently got. pws