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 separate. There's no compelling reason to have just
one such array.

> If fchdir is in use, the shadow array contains char* names of directory fds
> If dirfd is in use, the shadow array contains DIR* counterparts to
> directory fds

These two could use the same array, since the entries appear and disappear
at the same occasions. But it depends on the details.

> So you're saying that the better approach would be to expand fd-hook to
> allow registration of various :AROUND methods, and that any combination
> of the fchdir, socket, and/or nonblocking modules registers up to three
> separate :AROUND method for 'close'.

That's the flexible approach we have as an option.

I think that for now it is slightly overkill, because we have been doing
fine with "#if REPLACE_FCHDIR", and adding a "#if WINDOWS_NONBLOCKING" will
not make things go awry. But the approach to extend fd-hook is something
to remember, for the day when we really need it.

Bruno
-- 
In memoriam Heinz Droßel <http://en.wikipedia.org/wiki/Heinz_Drossel>

Reply via email to