about summary refs log tree commit diff
path: root/hurd
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-11-14 02:03:35 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-11-14 02:05:52 +0100
commit8f22e36238c94e2a89da624e03c224895f9dd691 (patch)
tree90aac85e53cef74431791503502caab828f931d2 /hurd
parent2f5524cc5381eb75fef55f7901bb907bd5628333 (diff)
downloadglibc-8f22e36238c94e2a89da624e03c224895f9dd691.tar.gz
glibc-8f22e36238c94e2a89da624e03c224895f9dd691.tar.xz
glibc-8f22e36238c94e2a89da624e03c224895f9dd691.zip
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.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/intr-msg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c
index bc1f43d383..98f588f206 100644
--- a/hurd/intr-msg.c
+++ b/hurd/intr-msg.c
@@ -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