Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jul 2018 18:51:35 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 229741] kevent is not properly adding EVFILT_READ and EVFILT_WRITE for unix sockets when used in one call
Message-ID:  <bug-229741-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229741

            Bug ID: 229741
           Summary: kevent is not properly adding EVFILT_READ and
                    EVFILT_WRITE for unix sockets when used in one call
           Product: Base System
           Version: 10.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: radovanovic@gmail.com
 Attachment #195091 text/plain
         mime type:

Created attachment 195091
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D195091&action=
=3Dedit
simple test

When adding two events to watch (EVFILT_READ and EVFILT_WRITE) in single ca=
ll
kevent is not handling them properly (at least for unix sockets). If both a=
re
added in one call which one is reported depends on their order; however if =
they
are added using 2 calls everything works as expected

I.e.

struct kevent kev[2];
...
kevent(kqueue, kev, 2, NULL, 0, NULL);

and

struct kevent kev[2];
...
kevent(kqueue, kev, 1, NULL, 0, NULL);
kevent(kqueue, kev + 1, 1, NULL, 0, NULL);=20

do not give identical results.

Simple test case is attached - expected result would be for test program to
output at least one line saying:

BothReadWrite received EVFILT_WRITE

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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