From owner-freebsd-arch Tue Feb 6 7:31:11 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 C36D437B401 for ; Tue, 6 Feb 2001 07:30:54 -0800 (PST) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f16FW1Y20391; Tue, 6 Feb 2001 09:32:01 -0600 (CST) (envelope-from jlemon) Date: Tue, 6 Feb 2001 09:32:01 -0600 From: Jonathan Lemon To: Jonathan Graehl Cc: Jonathan Lemon , freebsd-arch@FreeBSD.ORG Subject: Re: nonblocking sockets and EINTR (kevent does not observe SA_RESTART?) Message-ID: <20010206093201.K650@prism.flugsvamp.com> References: <20010205193507.J650@prism.flugsvamp.com> 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:50:37PM -0800, Jonathan Graehl wrote: > 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? Correct. Technically, an EINTR is returned when a signal interrupts the process after it goes to sleep (that is, after it calls tsleep). So if (as an example) you call kevent() with a zero valued timespec, you'll never get EINTR, since there's no possibility of it sleeping. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message