git-single-select-timeout
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Thu, 12 Mar 2020 22:47:03 +0000 (22:47 +0000)
committerAurelien Jarno <aurel32@debian.org>
Thu, 12 Mar 2020 22:47:03 +0000 (22:47 +0000)
commit fffcbbb0b5ff8864086f7b58fdbb8aa4c71943d0
Author: Richard Braun <rbraun@sceen.net>
Date:   Mon Dec 17 09:57:41 2012 +0000

    Fix _hurd_select for single fd sets

    The function attempts to optimize this case by performing one IPC system call
    with the timeout included among the parameters, but in the absence of a reply,
    it will call mach_msg again with the same timeout later, effectively doubling
    the total timeout of the select/poll call.

    Remove this optimization for the time being.

    * hurd/hurdselect.c (_hurd_select): Always call __io_select with no timeout.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-single-select-timeout.diff

hurd/hurdselect.c

index 6997b2b73b995aef2c228c26f580e750ba8600b8..a5e6e26b9a4e2a9d0a0b936774ae0951dc6ba74e 100644 (file)
@@ -236,10 +236,7 @@ _hurd_select (int nfds,
          {
            int type = d[i].type;
            d[i].reply_port = __mach_reply_port ();
-           err = __io_select (d[i].io_port, d[i].reply_port,
-                              /* Poll only if there's a single descriptor.  */
-                              (firstfd == lastfd) ? to : 0,
-                              &type);
+           err = __io_select (d[i].io_port, d[i].reply_port, 0, &type);
            switch (err)
              {
              case MACH_RCV_TIMED_OUT: