public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] hurd: Make _hurd_intr_rpc_mach_msg avoid returning MACH_SEND_INTERRUPTED
Date: Tue, 14 Nov 2023 01:06:18 +0000 (GMT)	[thread overview]
Message-ID: <20231114010618.2099F3858CD1@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8f22e36238c94e2a89da624e03c224895f9dd691

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.

Diff:
---
 hurd/intr-msg.c | 6 ++++++
 1 file changed, 6 insertions(+)

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

                 reply	other threads:[~2023-11-14  1:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231114010618.2099F3858CD1@sourceware.org \
    --to=sthibaul@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).