From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 39D3F3858C33; Sat, 26 Aug 2023 14:34:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39D3F3858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1693060481; bh=A58/xNmOjqGSDn7oQkDRCtwBQh2qKLK+eY2aKwWCI4U=; h=Date:From:To:Subject:Reply-To:References:In-Reply-To:From; b=V8fwY18RvK2WHj48XeIPyAqIunWqirwSxc2wk1dnFAqPg9IpYRFj4fJTmCU6xjpz5 REYh413AT3MMtEqBs+liGY8hgdTsC3AGNAlrbCsSqgtoVAGcwVE2GyVP/x9IckAa80 TXBTI/CZlxXmkkNgaOBqFEGwQRDAsajwutAlgFhE= Received: by calimero.vinschen.de (Postfix, from userid 500) id 5FDEDA80CAB; Sat, 26 Aug 2023 16:34:39 +0200 (CEST) Date: Sat, 26 Aug 2023 16:34:39 +0200 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: [EXTERNAL] Re: scp stalls on uploading in cygwin 3.5 current master. Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20230824123131.390b4471915c963425c77608@nifty.ne.jp> <20230825174832.9ebae8112667d5d5411cb8db@nifty.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: On Aug 26 14:15, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrote: > > This thread is not about send() blocking or returning EAGAIN. This > > is about the behaviour of select(2) and poll(2). > > I was merely commenting on your note that if select() returned a socket as > writable, and send() writes more than internally allowed, then send() would block. > It wouldn't! It'd just write the allowable count, and return as a short write, > whether the socket was blocking or not. But that's not the situation here. It's not helpful to get this kind of comment without it actually referring to the context in question. We're coming from a select call which is implemented via Winsock-specific network events. Everything else is a followup and a result of this. > select() and poll() whether I/O would block. By the virtue of this, > a socket, which is in error (except for EAGAIN), is writable exactly > because write()/send() to such a socket would return -1 right away. And that's not the case her either. Corinna