Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 3 Feb 2003 16:35:46 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: 1.3.19-1:poll bug. Patch included. Message-ID: <20030203153546.GF9587@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20030203030307 DOT GA16149 AT redhat DOT com> <39DA1DA2-3747-11D7-87B3-00306540AD5E AT rehley DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <39DA1DA2-3747-11D7-87B3-00306540AD5E@rehley.net> User-Agent: Mutt/1.4i On Sun, Feb 02, 2003 at 11:15:08PM -0800, Peter Rehley wrote: > Hello, > > Just to make sure that we are both clear. Change recvfrom so that if > the buffer is too small it returns the number of bytes that can be > written into the buffer instead of setting errno. Also clear errno > since there is no error. Reading SUSv3, it seems like the most practical way. SUSv3 doesn't know about EMSGSIZE (at least not in recv() and friends) but the function just returns the number of bytes copied to the buffer and discards all remaining bytes in case of message-oriented sockets, except if MSG_PEEK is given. So it seems to be most useful to change recvfrom so that in case of SOCKET_ERROR it checks for WSAEMSGSIZE and returns the buffer size instead, not setting errno at all. I'll check that change in. > Now in poll since we will now be returning the number of bytes instead > of -1, do we will need to check for WSAEMSGSIZE? I don't think so > because that will now be handled in recvfrom. > > Is this correct? Yes, AFAICS. Would you mind to test the next developers snapshot? Thanks for the discussion of that problem, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/