Date: Mon, 5 Feb 2001 22:08:04 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: Jonathan Lemon <jlemon@flugsvamp.com> Cc: Jonathan Graehl <jonathan@graehl.org>, freebsd-arch@freebsd.org, Jonathan Lemon <jlemon@freebsd.org> Subject: Re: nonblocking sockets and EINTR (kevent does not observe SA_RESTART?) Message-ID: <20010205220804.M26076@fw.wintelcom.net> In-Reply-To: <20010205193507.J650@prism.flugsvamp.com>; from jlemon@flugsvamp.com on Mon, Feb 05, 2001 at 07:35:07PM -0600 References: <20010205154842.J26076@fw.wintelcom.net> <NCBBLOALCKKINBNNEDDLGEFPDKAA.jonathan@graehl.org> <20010205193507.J650@prism.flugsvamp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Jonathan Lemon <jlemon@flugsvamp.com> [010205 17:33] wrote: > On Mon, Feb 05, 2001 at 05:16:56PM -0800, Jonathan Graehl wrote: > > > You can specify that syscalls will or won't be automatically > > > restarted via the sigaction() API. > > > > > > -- > > > -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] > > > > Thank you for reminding me of this (and making me feel like my question could > > have been better directed at -questions, if it is so trivially answered ;) > > > > I am using sigaction with SA_RESTART, and I still get EINTR from my kevent call > > (no matter, this is easily dealt with, due to the straightforward kevent > > semantics). I assume that SA_RESTART then only applies to the traditional > > syscalls (read/write,send/recv), and that this may be an oversight in the kqueue > > implementation, at least meriting a warning in the man page > > 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. I'm pretty sure select() and poll() do not respect SA_RESTART either, so it's probably best that kevent doesn't as well. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." 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?20010205220804.M26076>