Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268886AbUJFSEi (ORCPT ); Wed, 6 Oct 2004 14:04:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269328AbUJFSEi (ORCPT ); Wed, 6 Oct 2004 14:04:38 -0400 Received: from [213.196.40.106] ([213.196.40.106]:54678 "EHLO eljakim.netsystem.nl") by vger.kernel.org with ESMTP id S268886AbUJFSEd (ORCPT ); Wed, 6 Oct 2004 14:04:33 -0400 Date: Wed, 6 Oct 2004 20:04:29 +0200 (CEST) From: Joris van Rantwijk X-X-Sender: joris@eljakim.netsystem.nl To: Alan Cox cc: Linux Kernel Mailing List Subject: Re: UDP recvmsg blocks after select(), 2.6 bug? In-Reply-To: <1097080873.29204.57.camel@localhost.localdomain> Message-ID: References: <1097080873.29204.57.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1264 Lines: 33 Hello, Many thanks to you everybody else for their helpfull comments. On Wed, 6 Oct 2004, Alan Cox wrote: > On Mer, 2004-10-06 at 15:52, Joris van Rantwijk wrote: > > My understanding of POSIX is limited, but it seems to me that a read call > > must never block after select just said that it's ok to read from the > > descriptor. So any such behaviour would be a kernel bug. > > Select indicates there may be data. That is all - it might also be an > error, it might turn out to be wrong. > > You should always combine select with nonblocking I/O Ok, thanks. It turns out now that I (and a lot of people with me) have always been wrong about this. I will go fix the application (dnsmasq) and try to get the fix to the author. Sorry about my wrongly blaming the kernel. I do think this issue shows hat the select(2) manual needs fixing. For clarity, I'd like to point out that my case has nothing to do with multi-threading. Using select from multiple threads is a totally different sort of mistake. Bye, Joris. - 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/