From owner-freebsd-arch Mon Feb 5 22: 8:23 2001 Delivered-To: freebsd-arch@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 6B39237B401; Mon, 5 Feb 2001 22:08:06 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f16684g29040; Mon, 5 Feb 2001 22:08:04 -0800 (PST) Date: Mon, 5 Feb 2001 22:08:04 -0800 From: Alfred Perlstein To: Jonathan Lemon Cc: Jonathan Graehl , freebsd-arch@freebsd.org, Jonathan Lemon Subject: Re: nonblocking sockets and EINTR (kevent does not observe SA_RESTART?) Message-ID: <20010205220804.M26076@fw.wintelcom.net> References: <20010205154842.J26076@fw.wintelcom.net> <20010205193507.J650@prism.flugsvamp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010205193507.J650@prism.flugsvamp.com>; from jlemon@flugsvamp.com on Mon, Feb 05, 2001 at 07:35:07PM -0600 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Jonathan Lemon [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