From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin-developers@cygwin.com
Subject: Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
Date: Mon, 8 Nov 2021 17:23:14 +0900 [thread overview]
Message-ID: <20211108172314.fa447a10fb8b2671f8f3c7ad@nifty.ne.jp> (raw)
In-Reply-To: <3ba531da-6691-1fba-7892-4e52273d92d8@cornell.edu>
On Sun, 7 Nov 2021 17:20:46 -0500
Ken Brown wrote:
> In the meantime I found the commit that changed the default from byte mode to
> message mode:
>
> commit 31d2bedc585420092eb53895c5f5646651f13215
> Author: Christopher Faylor <me@cgf.cx>
> Date: Sun Oct 23 19:01:47 2011 +0000
>
> * fhandler_tty.cc (fhandler_pty_slave::read): Use consistent way for testing
> ReadFile return.
> * pipe.cc (fhandler_pipe::create_selectable): Open the write side of the pipe
> in message-mode to force writing as "chunks". Explain why.
>
> [...]
> --- a/winsup/cygwin/pipe.cc
> +++ b/winsup/cygwin/pipe.cc
> @@ -238,9 +238,15 @@ fhandler_pipe::create_selectable (LPSECURITY_ATTRIBUTES
> sa_ptr, HANDLE& r,
> [...]
> + Note that the write side of the pipe is opened as PIPE_TYPE_MESSAGE.
> + This *seems* to more closely mimic Linux pipe behavior and is
> + definitely required for pty handling since fhandler_pty_master
> + writes to the pipe in chunks, terminated by newline when CANON mode
> + is specified. */
> r = CreateNamedPipe (pipename, PIPE_ACCESS_INBOUND | overlapped,
> - PIPE_TYPE_BYTE | PIPE_READMODE_BYTE, 1, psize,
> + PIPE_TYPE_MESSAGE | PIPE_READMODE_BYTE, 1, psize,
> psize, NMPWAIT_USE_DEFAULT_WAIT, sa_ptr);
>
> if (r != INVALID_HANDLE_VALUE)
>
> I also found discussion on the mailing list on the same day as this commit in
> which cgf referred to fixing a bug (that *I* reported, coincidentally):
>
> https://cygwin.com/pipermail/cygwin/2011-October/197953.html
>
> I'll try to test more thoroughly tomorrow, but a quick test seems to show that
> the STC I submitted in connection with that bug report now succeeds even with
> CYGWIN=pipe_byte.
The STC attached to that post is checking pty behaviour. Currently,
the named pipe for pty is always configured as message type regardless
of CYGWIN=pipe_byte.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
next prev parent reply other threads:[~2021-11-08 8:23 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAEv6GOB8PXHgHoz7hdJy6Bia2GWEmUDnTd252gTGinz2vuv=hA@mail.gmail.com>
[not found] ` <20211105123950.b118a7f2ba38379764df4c12@nifty.ne.jp>
[not found] ` <CAEv6GOA-y58YrftXgEgFrjqtOTHmfdu2Vrq76Lwn0suZpZ=U9w@mail.gmail.com>
[not found] ` <20211105170542.96ce6dd4ca32880ddfddd660@nifty.ne.jp>
[not found] ` <CAEv6GODiM88Xfhk9R3AcEW6UTYSzACzYe4C0gPoTYm=u9ZTqRQ@mail.gmail.com>
[not found] ` <20211106044116.698b465a5d8ed6ce2cc75c99@nifty.ne.jp>
[not found] ` <2cfa5de7-3b95-9062-4572-f36d304bc916@cornell.edu>
2021-11-06 6:10 ` Takashi Yano
2021-11-06 11:42 ` Corinna Vinschen
2021-11-06 12:02 ` Corinna Vinschen
2021-11-06 14:13 ` Takashi Yano
2021-11-06 17:20 ` Corinna Vinschen
2021-11-07 3:01 ` Takashi Yano
2021-11-06 16:38 ` Ken Brown
2021-11-06 17:20 ` Corinna Vinschen
2021-11-07 3:46 ` Takashi Yano
2021-11-07 22:20 ` Ken Brown
2021-11-08 8:23 ` Takashi Yano [this message]
2021-11-08 9:46 ` Corinna Vinschen
2021-11-10 8:30 ` Takashi Yano
2021-11-10 10:34 ` Corinna Vinschen
2021-11-10 13:30 ` Takashi Yano
2021-11-10 20:35 ` Corinna Vinschen
2021-11-10 21:32 ` Ken Brown
2021-11-11 16:11 ` Ken Brown
2021-11-12 8:38 ` Takashi Yano
2021-11-16 23:46 ` Takashi Yano
2021-11-17 8:10 ` Takashi Yano
2021-11-17 15:12 ` Ken Brown
2021-11-11 9:52 ` Corinna Vinschen
2021-11-11 11:12 ` Takashi Yano
2021-11-11 11:33 ` Corinna Vinschen
2021-11-11 12:02 ` Takashi Yano
2021-11-11 13:20 ` Takashi Yano
2021-11-11 16:07 ` Corinna Vinschen
2021-11-12 8:33 ` Takashi Yano
2021-11-12 10:02 ` Corinna Vinschen
2021-12-12 13:26 ` Takashi Yano
2021-12-12 13:36 ` Ken Brown
2021-12-13 11:15 ` Takashi Yano
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=20211108172314.fa447a10fb8b2671f8f3c7ad@nifty.ne.jp \
--to=takashi.yano@nifty.ne.jp \
--cc=cygwin-developers@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).