Skip to content

Commit

Permalink
msys2-runtime: Update (suppress proc_waiter error messages)
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Nov 14, 2024
1 parent ad465ec commit 56e8b5b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From eafd9a22bc82cc443352a08c2853cd0d8649a436 Mon Sep 17 00:00:00 2001
From: Jeremy Drake <[email protected]>
Date: Wed, 13 Nov 2024 15:13:04 -0800
Subject: [PATCH 43/N] fixup! cygthread: suspend thread before terminating.

Suppress error output if ReadFile on child wait pipe returns
ERROR_OPERATION_ABORTED due to addition of CancelSynchronousIo call.
---
winsup/cygwin/pinfo.cc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index a5f5d6e..43e0034 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -1262,13 +1262,14 @@ proc_waiter (void *arg)

for (;;)
{
- DWORD nb;
+ DWORD nb, err;
char buf = '\0';

if (!ReadFile (vchild.rd_proc_pipe, &buf, 1, &nb, NULL)
- && GetLastError () != ERROR_BROKEN_PIPE)
+ && (err = GetLastError ()) != ERROR_BROKEN_PIPE)
{
- system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe);
+ if (err != ERROR_OPERATION_ABORTED)
+ system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe);
break;
}

11 changes: 7 additions & 4 deletions msys2-runtime/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkgbase=msys2-runtime
pkgname=('msys2-runtime' 'msys2-runtime-devel')
pkgver=3.5.4
pkgrel=4
pkgrel=5
pkgdesc="Cygwin POSIX emulation engine"
arch=('x86_64')
url="https://www.cygwin.com/"
Expand Down Expand Up @@ -70,7 +70,8 @@ source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-$
0039-uname-report-msys2-runtime-commit-hash-too.patch
0040-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch
0041-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch
0042-cygthread-suspend-thread-before-terminating.patch)
0042-cygthread-suspend-thread-before-terminating.patch
0043-fixup-cygthread-suspend-thread-before-terminating.patch)
sha256sums=('b8dce32fd9746506752d90ac3f30454fe1689100b08c41442016aaf244cc8584'
'9f9e1b6b05cbc9a715fe9443740b25171e9c1a276a058e6ba7e4f6eada6872c8'
'e5b2095e543a5d702cfce6da26cd17a78f40e17620315b1bcc434b94a007ae9b'
Expand Down Expand Up @@ -113,7 +114,8 @@ sha256sums=('b8dce32fd9746506752d90ac3f30454fe1689100b08c41442016aaf244cc8584'
'f93578a1150d724a60a7e8eb8491342aeb13f809e2ddb5193d8d126465f665cb'
'41e896036ea67c5d12a712554f4d53949c2dc809bb3545ac6be1fe619848f8af'
'34035a411acb71c81a7f4a2367d2cf9f7f00572b6e92c7ba5506e6a48e4867ca'
'6ae29efcd4d17aad01eed252d166de4dd13c0bb2274905933152a1eb21c517dc')
'6ae29efcd4d17aad01eed252d166de4dd13c0bb2274905933152a1eb21c517dc'
'1c08c1c6ff588b8a3db23b8506c3e2c52c207f363d7c04b44da50640f176aab6')

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
Expand Down Expand Up @@ -192,7 +194,8 @@ prepare() {
0039-uname-report-msys2-runtime-commit-hash-too.patch \
0040-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch \
0041-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch \
0042-cygthread-suspend-thread-before-terminating.patch
0042-cygthread-suspend-thread-before-terminating.patch \
0043-fixup-cygthread-suspend-thread-before-terminating.patch
}

build() {
Expand Down

0 comments on commit 56e8b5b

Please sign in to comment.