Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2008 22:38:17 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Vlad GALU <dudu@dudu.ro>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: A (perhaps silly) kqueue question
Message-ID:  <20080307223723.X42870@fledge.watson.org>
In-Reply-To: <ad79ad6b0803070847v7464381en958ef73455ed9c89@mail.gmail.com>
References:  <ad79ad6b0803070847v7464381en958ef73455ed9c89@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 7 Mar 2008, Vlad GALU wrote:

> I see an unusual symptom with one of our in-house applications. The main I/O 
> loop calls kevent(), which in turn returns two events with EV_EOF error set, 
> always for the same descriptors (they're both socket descriptors). As the 
> man page is not pretty clear about it and I don't have my UNP copy at hand, 
> I would like to ask the list whether the error events are supposed to be 
> one-shot or not.

I wonder if it's returning one event for the read socket buffer, and one event 
for the write socket buffer, since there are really two event sources for each 
socket?  Not that this is desirable behavior, but it might explain it.  If you 
shutdown() only read, do you get back one EOF kevent and one writable kevent?

Robert N M Watson
Computer Laboratory
University of Cambridge



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