hurd: Make _hurd_intr_rpc_mach_msg avoid returning MACH_SEND_INTERRUPTED
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 14 Nov 2023 01:03:35 +0000 (02:03 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 14 Nov 2023 01:05:52 +0000 (02:05 +0100)
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.

hurd/intr-msg.c

index bc1f43d..98f588f 100644 (file)
@@ -143,6 +143,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