mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David M. Lloyd" <dmlloyd@flurg.com>
To: Peter Lezoch <pledr@t-online.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Error binding socket: address already in use
Date: Wed, 13 Sep 2006 09:46:40 -0500	[thread overview]
Message-ID: <1158158800.11559.13.camel@localhost> (raw)
In-Reply-To: <1GNVuW-02KMfw0@fwd29.sul.t-online.de>

On Wed, 2006-09-13 at 14:41 +0000, 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 ?

Perhaps SO_REUSEADDR is what you're looking for?

man 7 socket

- DML


  parent reply	other threads:[~2006-09-13 14:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-13 14:41 Peter Lezoch
2006-09-13 14:46 ` Jan Engelhardt
2006-09-13 14:46 ` David M. Lloyd [this message]
2006-09-13 15:23 ` Alan Cox
2006-09-14  7:15   ` Colin Hirsch
2006-09-13 15:33 ` linux-os (Dick Johnson)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1158158800.11559.13.camel@localhost \
    --to=dmlloyd@flurg.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pledr@t-online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®