Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S270439AbUJUBFJ (ORCPT ); Wed, 20 Oct 2004 21:05:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S270617AbUJUBFH (ORCPT ); Wed, 20 Oct 2004 21:05:07 -0400 Received: from zcars04f.nortelnetworks.com ([47.129.242.57]:45309 "EHLO zcars04f.nortelnetworks.com") by vger.kernel.org with ESMTP id S270439AbUJUBDZ (ORCPT ); Wed, 20 Oct 2004 21:03:25 -0400 Message-ID: <41770AC6.7090604@nortelnetworks.com> Date: Wed, 20 Oct 2004 19:03:02 -0600 X-Sybari-Space: 00000000 00000000 00000000 00000000 From: Chris Friesen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: davids@webmaster.com CC: "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: Re: UDP recvmsg blocks after select(), 2.6 bug? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 805 Lines: 20 David Schwartz wrote: > Perhaps I missed the details, but under your proposal, how do you predict > at 'select' time what mode the socket will be in at 'recvmsg' time?! Well, if you've got a blocking socket, and do a nonblocking read with MSG_DONTWAIT, everything works fine. You lose a bit of performance, but it works. The problem case is if you create a socket, set O_NONBLOCK, do select, clear O_NONBLOCK, then do a recvmsg(). I suspect it's not a very common thing to do, so my proposal would still help the vast majority of existing apps. Chris - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/