From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin-patches@cygwin.com
Subject: [PATCH] Cygwin: pipe: Handle WAIT_CANCELED when waiting read_mtx.
Date: Wed, 10 Nov 2021 17:23:52 +0900 [thread overview]
Message-ID: <20211110082352.1253-1-takashi.yano@nifty.ne.jp> (raw)
- Add missing handling for WAIT_CANCELED in cygwait() for read_mtx
in raw_read().
---
winsup/cygwin/fhandler_pipe.cc | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler_pipe.cc b/winsup/cygwin/fhandler_pipe.cc
index bc06d157c..13731437e 100644
--- a/winsup/cygwin/fhandler_pipe.cc
+++ b/winsup/cygwin/fhandler_pipe.cc
@@ -302,10 +302,18 @@ fhandler_pipe::raw_read (void *ptr, size_t& len)
set_errno (EAGAIN);
len = (size_t) -1;
return;
- default:
+ case WAIT_SIGNALED:
set_errno (EINTR);
len = (size_t) -1;
return;
+ case WAIT_CANCELED:
+ pthread::static_cancel_self ();
+ /* NOTREACHED */
+ default:
+ /* Should not reach here. */
+ __seterrno ();
+ len = (size_t) -1;
+ return;
}
while (nbytes < len)
{
--
2.33.0
next reply other threads:[~2021-11-10 8:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 8:23 Takashi Yano [this message]
2021-11-10 10:35 ` Corinna Vinschen
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=20211110082352.1253-1-takashi.yano@nifty.ne.jp \
--to=takashi.yano@nifty.ne.jp \
--cc=cygwin-patches@cygwin.com \
/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).