git-send_interrupt
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Wed, 31 Jan 2024 20:45:37 +0000 (21:45 +0100)
committerAurelien Jarno <aurel32@debian.org>
Wed, 31 Jan 2024 20:45:37 +0000 (21:45 +0100)
commit 8f22e36238c94e2a89da624e03c224895f9dd691
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Nov 14 02:03:35 2023 +0100

    hurd: Make _hurd_intr_rpc_mach_msg avoid returning MACH_SEND_INTERRUPTED

    When the given options do not include MACH_SEND_INTERRUPT,
    _hurd_intr_rpc_mach_msg (aka mach_msg) is not supposed to return
    MACH_SEND_INTERRUPTED.  In such a case we thus have to retry sending the
    message.

    This was observed to fix various occurrences of spurious
    "(ipc/send) interrupted" errors when running haskell programs.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-send_interrupt.diff

hurd/intr-msg.c

index 1a086b51411773a3cb963b60b2118a4977539560..0c938c91233db71ae10c7b35dd23db0884e80a38 100644 (file)
@@ -142,6 +142,12 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
             XXX */
          goto retry_receive;
        }
+      if (!(option & MACH_SEND_INTERRUPT))
+       {
+         option = user_option;
+         timeout = user_timeout;
+         goto message;
+       }
       /* FALLTHROUGH */
 
       /* These are the other codes that mean a pseudo-receive modified