From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-06.nifty.com (conssluserg-06.nifty.com [210.131.2.91]) by sourceware.org (Postfix) with ESMTPS id 4A4883858406 for ; Mon, 8 Nov 2021 08:23:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4A4883858406 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from Express5800-S70 (z221123.dynamic.ppp.asahi-net.or.jp [110.4.221.123]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 1A88NEeJ017002 for ; Mon, 8 Nov 2021 17:23:14 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 1A88NEeJ017002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1636359794; bh=AEh79dbhQg+afNCvzfQ61Z5LiyZ0wqa9YErB5Fbyl5o=; h=Date:From:To:Subject:In-Reply-To:References:From; b=UbSRTWXG4pZgEFroHO+pzngiDtxiXX8qXj7oKIa0xTaJhk25MMex10swgjDA4d086 oL2dxekntLhEhBoPMjX3kvEgOyOiAiWLqFJH+ULeReDdF9QusHTGM4Mo5BlS0l4Ced xI78cCaPSxBdF2Fx9nWtuO5YyFy5IS2fZgNk2C2Bhi4Y3jQOmP0I5u9H7+FiA8ynj1 ZS3QJTsLqFhkintfG56VfbOUQstfV4IIGXG5RvOVvGDakXfVslbv3ZOu7JIM67zALy o6hiyphchpFnHqHuCIwEUg6vvAP4pMnFEkYYi8kHgMDV3vkROE5VEAzFomqVvTfkG+ bkYGGKdfpZVVQ== X-Nifty-SrcIP: [110.4.221.123] Date: Mon, 8 Nov 2021 17:23:14 +0900 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot Message-Id: <20211108172314.fa447a10fb8b2671f8f3c7ad@nifty.ne.jp> In-Reply-To: <3ba531da-6691-1fba-7892-4e52273d92d8@cornell.edu> References: <20211105123950.b118a7f2ba38379764df4c12@nifty.ne.jp> <20211105170542.96ce6dd4ca32880ddfddd660@nifty.ne.jp> <20211106044116.698b465a5d8ed6ce2cc75c99@nifty.ne.jp> <2cfa5de7-3b95-9062-4572-f36d304bc916@cornell.edu> <20211106151047.4d8f626bd6ebe9e4d8017f3b@nifty.ne.jp> <5819b4c3-ea10-8292-2449-23d79e6bc896@cornell.edu> <20211107124606.f68b27d7e5600b203e37fc7a@nifty.ne.jp> <3ba531da-6691-1fba-7892-4e52273d92d8@cornell.edu> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2021 08:23:55 -0000 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 > 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