This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Fri Apr 26 06:13:57 2024 Delivery-date: Wed, 13 Sep 2006 15:33:50 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750949AbWIMPdQ (ORCPT ); Wed, 13 Sep 2006 11:33:16 -0400 Received: from odyssey.analogic.com ([204.178.40.5]:3343 "EHLO odyssey.analogic.com") by vger.kernel.org with ESMTP id S1750945AbWIMPdP convert rfc822-to-8bit (ORCPT ); Wed, 13 Sep 2006 11:33:15 -0400 Received: from chaos.analogic.com ([10.112.50.11]) by phoenix.analogic.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 13 Sep 2006 11:33:12 -0400 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Received: from chaos.analogic.com (localhost [127.0.0.1]) by chaos.analogic.com (8.12.11/8.12.11) with ESMTP id k8DFXCHh027575; Wed, 13 Sep 2006 11:33:12 -0400 Received: (from linux-os@localhost) by chaos.analogic.com (8.12.11/8.12.11/Submit) id k8DFXC6x027574; Wed, 13 Sep 2006 11:33:12 -0400 X-OriginalArrivalTime: 13 Sep 2006 15:33:12.0978 (UTC) FILETIME=[ECA9E720:01C6D749] content-class: urn:content-classes:message Subject: Re: Error binding socket: address already in use Date: Wed, 13 Sep 2006 11:33:12 -0400 Message-Id: In-Reply-To: <1GNVuW-02KMfw0@fwd29.sul.t-online.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Error binding socket: address already in use Thread-Index: AcbXSezSni3NkGbJQhOsqJiiYSnJow== References: <1GNVuW-02KMfw0@fwd29.sul.t-online.de> From: "linux-os \(Dick Johnson\)" To: "Peter Lezoch" Cc: Reply-To: "linux-os \(Dick Johnson\)" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 Sep 2006, Peter Lezoch wrote: > > Hi, > killing a server task that is operating on a UDP socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ), leaves the socket in an unclosed state. A subsequently started task, that wants to use the same port, gets from bind above error message.This is, in my opinion, wrong behavior, because of the connectionless nature of UDP. Only reboot solves this situation. It looks, as if in net/socket.c, TCP and UDP are handled in the same way without taking into account the different nature of the protocols?! > How can I overcome this problem ? > > kind regards > > peter lezoch Try: int opt = 1; setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); Cheers, Dick Johnson Penguin : Linux version 2.6.16.24 on an i686 machine (5592.66 BogoMips). New book: http://www.AbominableFirebug.com/ _  **************************************************************** The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them. Thank you. - 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/