[PATCH] Fix epoll backend to allow separate read/write events on one fd.

Stefan (metze) Metzmacher metze at samba.org
Wed Feb 13 13:40:53 MST 2013


Hi Jeremy,

> The tevent epoll backend has a bug in that it does
> not allow separate read/write events to be added
> using the same file descriptor.

This is a known problem and it's reason why we use dup() in
smbXcli_conn_create().

I'd preferr that we don't allow more than one event handler per fd
in general. A socket should be only used by one logical caller
everything else is a bug.

The tdgram_context and tstream_context abstractions only need one tevent_fd.

At least we should allow only one TEVENT_FD_READ handler and only one
TEVENT_FD_WRITE handler
for each fd. But I'd think it's better to avoid additional complexity in
the epoll backend,
which is already complex.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130213/32b2aec4/attachment.pgp>


More information about the samba-technical mailing list