Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Feb 2001 09:32:01 -0600
From:      Jonathan Lemon <jlemon@flugsvamp.com>
To:        Jonathan Graehl <jonathan@graehl.org>
Cc:        Jonathan Lemon <jlemon@flugsvamp.com>, freebsd-arch@FreeBSD.ORG
Subject:   Re: nonblocking sockets and EINTR (kevent does not observe SA_RESTART?)
Message-ID:  <20010206093201.K650@prism.flugsvamp.com>
In-Reply-To: <NCBBLOALCKKINBNNEDDLEEGADKAA.jonathan@graehl.org>
References:  <20010205193507.J650@prism.flugsvamp.com> <NCBBLOALCKKINBNNEDDLEEGADKAA.jonathan@graehl.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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