From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1792) id 2099F3858CD1; Tue, 14 Nov 2023 01:06:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2099F3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1699923978; bh=54jv514SIwwA3FJ6Q3pWsY171Bzkcn8hB+h7+TsG408=; h=From:To:Subject:Date:From; b=UFK3rh7X7eO4KCESgP5J1qVKhpREUKCTMhf/FzS5xGoUstvoCQRYkCOokDiAcCjLf UGosVTWOSeAT9J6fWFOnVd6Pg/I5+2PV3qdbJ1+7ctHKJ0Yg8KFzq65vcGJrtq9RND xRySdSbItnD9vgqfhmFYUPYE/8eZpDMslCYUah50= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Samuel Thibault To: glibc-cvs@sourceware.org Subject: [glibc] hurd: Make _hurd_intr_rpc_mach_msg avoid returning MACH_SEND_INTERRUPTED X-Act-Checkin: glibc X-Git-Author: Samuel Thibault X-Git-Refname: refs/heads/master X-Git-Oldrev: 2f5524cc5381eb75fef55f7901bb907bd5628333 X-Git-Newrev: 8f22e36238c94e2a89da624e03c224895f9dd691 Message-Id: <20231114010618.2099F3858CD1@sourceware.org> Date: Tue, 14 Nov 2023 01:06:18 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8f22e36238c94e2a89da624e03c224895f9dd691 commit 8f22e36238c94e2a89da624e03c224895f9dd691 Author: Samuel Thibault 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