tevent in multithreaded programs
Volker.Lendecke at SerNet.DE
Sat Jan 31 09:41:15 MST 2015
On Sat, Jan 31, 2015 at 10:27:59AM -0500, Simo wrote:
> > Local sendmsg dup's fds that you have to close. Another
> > syscall that you might want to avoid.
> First time I hear of this, do you have a pointer where I can read
> further about this behavior ?
I'm assuming you mean sendmsg with passing fd's. sendmsg through a AF_UNIX
socketpair gets you a copy of the fd after the recvmsg. This way you're
fully safe the underlying transmitted socket changes ownership between
the sending and the receiving thread, the downside being that you have
to close it in the sending thread.
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical