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

Re: Mangement of fdtable[]



On Sat, 24 Oct 2015 14:05:39 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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



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