Unix domain datagram based messaging

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Apr 10 04:26:36 MDT 2014

On Wed, Apr 09, 2014 at 02:28:19PM -0700, Jeremy Allison wrote:
> It's removing most of our signal issues,
> which is great ! However, at least within
> smbd we still have to handle slow system
> calls returning -1,EINTR if we get hit
> by POSIX realtime signals from the leases
> (of course due to this patchset this should
> now be *extremely* rare :-)
> So shouldn't:
> recv() in unix_dgram_recv_handler()
> connect() in unix_dgram_send_queue_init()
> send() in unix_dgram_send_job()
> sendmsg() in unix_dgram_send()
> in this patchset be changed to handle -1,EINTR with
> an immediate retry ?

I'm always a bit reluctant to add these unconditional loops,
because it postpones signal handling unnecessarily and makes
Ctrl-C not work as expected. For the syscalls that are
called from the central event loop, shouldn't we try to make
sure that we handle EINTR in the sense that the call just
did not happen? The event loop should come back to us
immediately again, the socket should still be ready as seen
by poll. You're right, I have not thought about this yet at
all, so some modifications are required. I just don't know
if the hard retry is the right thing in this very lowlevel


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 mailing list