[PATCH] Fix ETIME handling for Solaris event ports
jra at samba.org
Thu Feb 4 23:16:39 UTC 2016
On Thu, Feb 04, 2016 at 11:44:42PM +0100, Ralph Boehme wrote:
> according to the Illumos libc sources, port_getn() doesn't update nget
> on return for any other error then ETIME.
> This implies EINTR is only returned if there are no fd events,
Maybe. But look at the text from the link
"Think of ETIME/EINTR not as an error but as a supplementary bit of
inforation: port_getn() always returns, via the nget input/output
argument, the number of events fetched, and ETIME/EINTR merely indicate
whether a timeout or signal interrupted the wait for more events."
That does state EINTR can be returned *in addition*
to the number of events - but I do agree with your
assessment below - for that EINTR case to work nget
*must* be updated with the number of events.
> otherwise port_getn() would be completely broken for nget > 1. Luckily
> we're using it with n = 1 so I think we can assume if we get EINTR we
> got a signal and not a fd event, so there's no need to set and test
In that case, how about this simplified version of the patch
that handles the ETIME case, but leaves the EINTR version
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2400 bytes
Desc: not available
More information about the samba-technical