From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-04.nifty.com (conssluserg-04.nifty.com [210.131.2.83]) by sourceware.org (Postfix) with ESMTPS id 9E0853858406 for ; Sun, 7 Nov 2021 03:46:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9E0853858406 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-04.nifty.com with ESMTP id 1A73jtdO028105 for ; Sun, 7 Nov 2021 12:45:55 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 1A73jtdO028105 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1636256755; bh=GP2ffQkJkBRETwMA+axQQnFcDk3/1grA26sguISrnKY=; h=Date:From:To:Subject:In-Reply-To:References:From; b=csexukCXCK5Kz0hHzMfx4VpYjbyu3/wit357cUmf4FkBlTndW06EKt9ctTs3KKzs6 GQ7B6jVcFtBpUmjlz6TBUR7Eq3mQlmjc1mwhcLD6lYx/Hd9a9M3gMW7vUDyVMr0TMy 9RdoohypToTZOpLae4jTvo3NQPYsEqBJTxTSHloJjbSqPo0N2s8uv0yta/Ndm+CfRb fsUN/+i7WpkX2pxKyuopssRJOniwwH2DzmW2UVWg6Z3aH2JMW2zv5Aor2SeGbxjjss iuNMxCxJa8TRGfh1DL+Rliwip+4v9p7tRG1/LAGFRxz1VQ7j3/udZf8CungLP0x6Ma ea0qKHWd5xdQg== X-Nifty-SrcIP: [110.4.221.123] Date: Sun, 7 Nov 2021 12:46:06 +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: <20211107124606.f68b27d7e5600b203e37fc7a@nifty.ne.jp> In-Reply-To: <5819b4c3-ea10-8292-2449-23d79e6bc896@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> 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.9 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: Sun, 07 Nov 2021 03:46:19 -0000 On Sat, 6 Nov 2021 12:38:43 -0400 Ken Brown wrote: > On 11/6/2021 7:42 AM, Corinna Vinschen wrote: > > On Nov 6 15:10, Takashi Yano wrote: > >> Ken Brown wrote: > >>> On 11/5/2021 3:41 PM, Takashi Yano via Cygwin wrote: > >>>> What about setting pipe mode to byte by default? > >>> > >>> I have a vague recollection that this caused some other problem, but I'll have > >>> to review the email discussions from a few months ago. I'm traveling at the > >>> moment and won't get to this for a few days. > > I found it: > > https://cygwin.com/pipermail/cygwin-developers/2021-August/012219.html Thanks! I tested the current pipe behaviour using the following test code. With both message and byte pipe, the result are the same: w:65536 r:2048 w:-1 which complies with POSIX requirement. I have tested under Windows Vista, 7 and 10 and got same results. #include #include #include #include #define PIPE_SIZE 65536 int main() { int fd[2]; char buf[PIPE_SIZE]; int flags; pipe(fd); /* Set non-blocking */ flags = fcntl(fd[1], F_GETFL); flags |= O_NONBLOCK; fcntl(fd[1], F_SETFL, flags); /* Fill pipe */ printf("w:%d\n", write(fd[1], buf, PIPE_SIZE)); /* Free PIPE_BUF/2 bytes */ printf("r:%d\n", read(fd[0], buf, PIPE_BUF/2)); /* Write PIPE_BUF bytes */ printf("w:%d\n", write(fd[1], buf, PIPE_BUF)); return 0; } -- Takashi Yano