bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: more info about sudo/pflocal/syslogd problem


From: Marcus Brinkmann
Subject: Re: more info about sudo/pflocal/syslogd problem
Date: Sun, 28 Oct 2001 03:57:27 +0100
User-agent: Mutt/1.3.18i

On Sat, Oct 27, 2001 at 09:59:15PM -0400, Roland McGrath wrote:
> At a quick glance, the code for both (hurdselect.c) looks the same to me,
> but I don't have time right now to examine it too thoroughly.  If the
> problem with poll does not happen with select, then hurdselect.c is almost
> certainly the place that has the bug. 

Well, I found a discrepancy, which seems to explain the bug.

2001-10-28  Marcus Brinkmann  <marcus@gnu.org>

        * hurd/hurdselect.c (_hurd_select): Set type to zero if
        SELECT_RETURNED is not set before filling in the `revents'
        members of the user's array.


--- hurdselect.c.old    Sun Oct 28 03:52:43 2001
+++ hurdselect.c        Sun Oct 28 03:53:52 2001
@@ -398,6 +398,9 @@ _hurd_select (int nfds,
        const int type = d[i].type;
        int_fast16_t revents = 0;
 
+       if ((type & SELECT_RETURNED) == 0)
+         type = 0;
+
        if (type & SELECT_READ)
          revents |= POLLIN;
        if (type & SELECT_WRITE)

Thanks,
Marcus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]