Date: Thu, 15 Aug 2002 18:20:04 -0700 (PDT) From: Lev Walkin <vlm@netli.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/36219: poll() behaves erratic on BPF file descriptors. Message-ID: <200208160120.g7G1K4t1061017@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/36219; it has been noted by GNATS.
From: Lev Walkin <vlm@netli.com>
To: Nate Lawson <nate@root.org>
Cc: freebsd-gnats-submit@FreeBSD.org, gad@freebsd.org,
bde@freebsd.org
Subject: Re: kern/36219: poll() behaves erratic on BPF file descriptors.
Date: Thu, 15 Aug 2002 18:17:37 -0700
Nate Lawson wrote:
> I looked over the current state of bpf.c and it seems like this PR can be
> closed. Comments?
>
> if (events & (POLLIN | POLLRDNORM)) {
> /*
> * An imitation of the FIONREAD ioctl code.
> * XXX not quite. An exact imitation:
> *if (d->b_slen != 0 ||
> * (d->bd_hbuf != NULL && d->bd_hlen != 0)
> */
> if (d->bd_hlen != 0 ||
> ((d->bd_immediate || d->bd_state == BPF_TIMED_OUT) &&
> d->bd_slen != 0))
Don't we want a POLLIN event to occur when the BPF_TIMED_OUT
state is reached and there is still no data?
This seems to be a timeout on waiting data, which should
be reported up.
> revents |= events & (POLLIN | POLLRDNORM);
> else {
>
> -Nate
>
--
Lev Walkin
vlm@netli.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208160120.g7G1K4t1061017>
