Date: Sat, 01 Apr 2006 16:51:00 +0200 From: =?UTF-8?B?VsOhY2xhdiBIYWlzbWFu?= <V.Haisman@sh.cvut.cz> To: hackers@freebsd.org Subject: kqueue oddity Message-ID: <442E9354.5010700@sh.cvut.cz>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Hi,
I have a little problem with kqueue/kevent. I am getting somewhat
strange events from kevent(). The struct kevent's contents looks like this:
kevent {.ident = 1, .filter = 0xfffffffe, .flags = 0x0001, .fflags =
0x00000000, .data = 0x000084c6}
.ident == 1 is stdout.
.filter == 0x fffffffe is -2 is EVFILT_WRITE which makes sense for stdout.
.fflags is empty, nothing out of ordinary for EVFILT_WRITE.
And here comes the oddity: .flags == 0x0001 means EV_ADD which totally
doesn't make sense to me and neither does according to man kqueue. The
code that exhibits this behaviour is io_loop_handler_run() in
ioloop-kqueue.c of Dovecot IMAP server.
I have re-read the docs more than once but I haven't noticed any sign of
that EV_ADD could be set for EVFILT_WRITE filter when I am receiving the
events through kevent() funtion. I am out of ideas what to do with it.
So I am asking all you hackers for any ideas of what might be going
wrong. Is it the code in Dovecot or is it FreeBSD that is doing
something wrong?
Vaclav Haisman
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQEVAwUBRC6TXG56zbtzMDG0AQLZFggApzkUJQlBQkHQUyEhBWwDOfnAO23SI1Pd
cXMWY9uBfyW02Ni+mV1YTRST7fTJtIC1j9rfhL2aRBezW93Q6zU0ZBOxc6UEC/bT
aBoAPHBvPWeng6gRUOb2orgauxp4EJididcewpBjT+rWIK5mx4/8fzYJz3xOXrQF
32zHSqDMIFQYNo7gcry8U2/xlDF5E5R8cWyKqfG/yHsgPUPm+CYtWE8Wn5hRZRMh
G2rqiqcr/AyHpQL+0MepBJGlukecqSelphIm5+HulOnUeWn5EDG2/38A0HQTksPD
oMg5jsQnkVU1q+4mLFrDqbIzVFMOcmt7H6zQTEUpDi98jAu28xWBlg==
=qpHI
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?442E9354.5010700>
