[bind10-dev] fd_share / send_fd

Michal 'vorner' Vaner michal.vaner at nic.cz
Thu Apr 7 14:57:24 UTC 2011


Hello

On Thu, Apr 07, 2011 at 10:24:32AM +0000, Francis Dupont wrote:
> Some questions about fd_share / send_fd:
>  - it seems there are two versions of them today: src/lib/xfr and
>   src/lib/util/io. It seems it is a simple code reorg, i.e.,
>   the code moved from xfr to util/io (BTW this is a good idea)

Actually, there should be just one. I merged a branch that moved it from xfr to
util/io, because I needed it in another place. The xfr should no longer contain
one. Is it possible you have some leftover or read the code before the merge?

>  - what kind of descriptors are moved? on some systems file
>   descriptors and "socket" file descriptors are different
>   (cf. Windows file and socket handles, note both can be
>    sent to another process and they are more different than
>    one could believe, e.g., close functions are different too!)
>   (it seems sockets, cf xfr code)

They should be socket file descriptors (we don't really send opened files over,
everyone can open it's own file). The two uses right now are socket file
descriptors.

>  - there are other ways to send a file descriptor, for instance
>   one can open /proc/<other_process_id>/fd/<file_descriptor_number>
>   on Linux or in general any OS with /proc file system.
>   I'd like to get a fd_share / send_fd clone using this /proc way
>   (IMHO it is far closer than PF_UNIX to what Windows support,
>    and this can remove some dependencies too).

Hmm, why can't there be two different versions, the same headers, but different
implementations for windows and the rest, like with some #ifdef WINDOWS or
something?

Anyway, windows don't have the /proc anyway, right?

Thanks

-- 
Why TODO list in haskell? It handles infinite data structures.

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20110407/590c6a93/attachment.bin>


More information about the bind10-dev mailing list