From owner-freebsd-arch Mon Feb 5 17:34:14 2001 Delivered-To: freebsd-arch@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id DB5FA37B491; Mon, 5 Feb 2001 17:33:55 -0800 (PST) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f161Z7Y95228; Mon, 5 Feb 2001 19:35:07 -0600 (CST) (envelope-from jlemon) Date: Mon, 5 Feb 2001 19:35:07 -0600 From: Jonathan Lemon To: Jonathan Graehl Cc: Alfred Perlstein , freebsd-arch@freebsd.org, Jonathan Lemon Subject: Re: nonblocking sockets and EINTR (kevent does not observe SA_RESTART?) Message-ID: <20010205193507.J650@prism.flugsvamp.com> References: <20010205154842.J26076@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message