diff options
author | 2014-08-06 19:31:30 +0000 | |
---|---|---|
committer | 2014-08-06 19:31:30 +0000 | |
commit | 9bc62dd3a7d60eb69f471d693562e4ba3a54365b (patch) | |
tree | b0f0baa7bc2aa2a5b65c18a0754fe105af83965a | |
parent | Always zero-out the fcgi record header for STDIN data. (diff) | |
download | wireguard-openbsd-9bc62dd3a7d60eb69f471d693562e4ba3a54365b.tar.xz wireguard-openbsd-9bc62dd3a7d60eb69f471d693562e4ba3a54365b.zip |
Support NOTE_EOF for kqueue EVFILT_READ filters on NFS files.
committing for jsg@, ok reyk@ tedu@ guenther@
-rw-r--r-- | sys/nfs/nfs_kq.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/nfs/nfs_kq.c b/sys/nfs/nfs_kq.c index aac0be74626..00cc0f9e51f 100644 --- a/sys/nfs/nfs_kq.c +++ b/sys/nfs/nfs_kq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_kq.c,v 1.20 2014/07/12 18:43:52 tedu Exp $ */ +/* $OpenBSD: nfs_kq.c,v 1.21 2014/08/06 19:31:30 guenther Exp $ */ /* $NetBSD: nfs_kq.c,v 1.7 2003/10/30 01:43:10 simonb Exp $ */ /*- @@ -230,6 +230,10 @@ filt_nfsread(struct knote *kn, long hint) #ifdef DEBUG printf("nfsread event. %lld\n", kn->kn_data); #endif + if (kn->kn_data == 0 && kn->kn_sfflags & NOTE_EOF) { + kn->kn_fflags |= NOTE_EOF; + return (1); + } return (kn->kn_data != 0); } |