From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dmta1003.nifty.com (mta-snd01013.nifty.com [106.153.227.45]) by sourceware.org (Postfix) with ESMTPS id 160063858D39 for ; Sat, 26 Aug 2023 23:41:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 160063858D39 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 HP-Z230 by dmta1003.nifty.com with ESMTP id <20230826234136788.TTSJ.19087.HP-Z230@nifty.com> for ; Sun, 27 Aug 2023 08:41:36 +0900 Date: Sun, 27 Aug 2023 08:41:36 +0900 From: Takashi Yano To: cygwin@cygwin.com Subject: Re: [EXTERNAL] Re: scp stalls on uploading in cygwin 3.5 current master. Message-Id: <20230827084136.3f6ecbfec6aee89508ecb079@nifty.ne.jp> In-Reply-To: References: <20230824060502.c4798062cb19d4d35a5633ae@nifty.ne.jp> <20230824123131.390b4471915c963425c77608@nifty.ne.jp> <20230825174832.9ebae8112667d5d5411cb8db@nifty.ne.jp> <20230826042924.53b49a9f8372a9196a151425@nifty.ne.jp> 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=-4.2 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sat, 26 Aug 2023 14:08:34 +0000 "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" wrote: > IMO you're triggering an undefined (or not well-defined) behavior, because of the murky status > of the byte count of 0. It may work now, but it may not work in the future... > > RETURN VALUE > On success, the number of bytes written is returned (zero indicates nothing was written). On error, -1 is returned, and > errno is set appropriately. > > If count is zero and fd refers to a regular file, then write() may return a failure status if one of the errors below is > detected. If no errors are detected, 0 will be returned without causing any other effect. If count is zero and fd refers > to a file other than a regular file, the results are not specified. You seems to reffer Linux man, however, this patch calls ssize_t fhandler_socket_wsock::write (const void *in_ptr, size_t len) of cygwin, NOT Linux write(). -- Takashi Yano