Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Feb 2001 17:50:37 -0800
From:      "Jonathan Graehl" <jonathan@graehl.org>
To:        "Jonathan Lemon" <jlemon@flugsvamp.com>
Cc:        <freebsd-arch@freebsd.org>
Subject:   RE: nonblocking sockets and EINTR (kevent does not observe SA_RESTART?)
Message-ID:  <NCBBLOALCKKINBNNEDDLEEGADKAA.jonathan@graehl.org>
In-Reply-To: <20010205193507.J650@prism.flugsvamp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I assume, then, that you guarantee that the changelist is applied (and errors
relating to the changes are placed in the received-events-buffer, if possible)
before the call becomes interruptible?  (and if there were an error that doesn't
fit in the buffer, the return would be immediate with the error code); that is,
only after the process goes to sleep waiting in kqueue, is there the possibility
of an EINTR return?  Or, is there the possibility of the changelist only being
partially executed when the result is EINTR?

I concur that the EINTR semantics are simple and consistent, but perhaps a
warning, to the effect that SA_RESTART does not prevent the EINTR outcome, is in
order (this may be the case for quite a few other syscalls as well, I have no
idea ... but it would be nice to see it documented)

> The difficulty in restarting the kevent call is that it would have
> to re-apply the changelist, which is probably not what you want.  The
> only case where it is possible to perform a restart is with an empty
> changelist.  I didn't put this optimization in, as I think it would be
> better if the interface was consistent in all cases.
> --
> Jonathan
>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NCBBLOALCKKINBNNEDDLEEGADKAA.jonathan>