Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2012 17:02:03 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Volodymyr Kostyrko <c.kworr@gmail.com>
Cc:        freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org
Subject:   Re: kern/149857: [kqueue] kqueue not reporting EOF under certain circumstances
Message-ID:  <20120710140203.GA2338@deviant.kiev.zoral.com.ua>
In-Reply-To: <4FFC1D2D.4020405@gmail.com>
References:  <4FFC1D2D.4020405@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--dfOvyYudzT1RPUKx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 10, 2012 at 03:16:45PM +0300, Volodymyr Kostyrko wrote:
> Hi all.
>=20
> http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/149857
>=20
> This PR is rather old. I just had submitted new test case, now in plain c.
>=20
> It doesn't work exactly like python version, but the result is the same:
>=20
> > clang test.c
> > cat test.c | ./a.out
> -1 916 0 0 0
> -1 0 32768 0 0
> > ./a.out < test.c
> -1 916 0 0 0
> <- and here we have a complete hang in [kqread].

And what is your expectation ?

The vnode filter never returns EOF when current file position at the end
of file. It is documented that read filter returns when file offset if not
at the end of file, thats all. In fact, EV_EOF is returned on forced unmoun=
t.
I do not see a bug in kqueue.

On the other hand, your C code has at least two things that I cannot
understand. First, EV_EOF is output flag, it makes absolutely no sense
to set it in command. Second, it is mistery for me what do you check with
		if (kev.flags >> 15 =3D=3D 1) {
test.

--dfOvyYudzT1RPUKx
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAk/8NdsACgkQC3+MBN1Mb4iTxACgjIyAmfQzKZ1YJhjVqpcDeRtq
cggAn1rOw71APAlZ1oyP+vvEyODsPtd2
=2fEs
-----END PGP SIGNATURE-----

--dfOvyYudzT1RPUKx--



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