Re: [RFC PATCH] fchdir: move fd shadowing into fd-hook

2011-04-28 Thread Bruno Haible
Hi Eric, > it sounds like you would rather maintain two or three shadow arrays > - one array in fchdir for dir names, one array in nonblocking for > nonblocking status.  Am I understanding you correctly? Yes. It appears that doing so allows (or makes it much easier) to keep independent code separ

Re: [RFC PATCH] fchdir: move fd shadowing into fd-hook

2011-04-28 Thread Eric Blake
On 04/28/2011 05:20 AM, Bruno Haible wrote: > Hi Eric, > >> In order to eventually add socket nonblocking status into >> fd shadowing, it is useful to move the existing fchdir name >> shadowing into a common file. > > No, that's definitely not useful. On the contrary, it would make it > harder to

Re: [RFC PATCH] fchdir: move fd shadowing into fd-hook

2011-04-28 Thread Bastien ROUCARIES
> Now there are two ways to proceed: > >  a) Formalize the notion of a set of :AROUND methods for 'dup', 'dup2', >     'dup3', 'fcntl', 'close', in such a way that the first and third code >     can share the same infrastructure. That would mean a file fd-hook2.c, >     similar to fd-hook.c but jus

Re: [RFC PATCH] fchdir: move fd shadowing into fd-hook

2011-04-28 Thread Bruno Haible
Hi Eric, > In order to eventually add socket nonblocking status into > fd shadowing, it is useful to move the existing fchdir name > shadowing into a common file. No, that's definitely not useful. On the contrary, it would make it harder to write and maintain the code that stores the socket non-b

[RFC PATCH] fchdir: move fd shadowing into fd-hook

2011-04-27 Thread Eric Blake
In order to eventually add socket nonblocking status into fd shadowing, it is useful to move the existing fchdir name shadowing into a common file. * modules/fd-hook (Depends-on): Add dosname, dup2, filenamecat-lgpl, getcwd-lgpl, malloc-posix, realloc-posix, stdbool, strdup-posix. * modules/fchdir