mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Schwartz" <davids@webmaster.com>
To: "Chris Evans" <chris@scary.beasts.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: Kernel bug with UNIX sockets not detecting other end gone?
Date: Thu, 17 May 2001 17:32:34 -0700	[thread overview]
Message-ID: <NCBBLIEPOCNJOAEKBEAKAEPJPBAA.davids@webmaster.com> (raw)
In-Reply-To: <Pine.LNX.4.30.0105180042440.21745-100000@ferret.lmh.ox.ac.uk>


> Hmm - there's definitely a Linux inconsistency here. With SOCK_DGRAM,
> read() is blocking but write() is giving ECONNRESET.
>
> The ECONNRESET makes sense to me (despite this being a datagram socket),
> because the sockets are anonymous. Once one end goes away, the other end
> is pretty useless.
>
> Cheers
> Chris

	One can justify any behavior, since this is a datagram socket but the
kernel does know that it has been 'disconnected'. One can even justify the
inconcsistent behavior -- the write definitely has no place to go (now), but
the read can't be totally sure that there is no possible way anybody could
ever find the other end and write to it.	I think it would, however, be
preferable to have it return ECONNRESET in all cases (read, write, and
'select'/'poll' should hit on read and write).

	DS


  reply	other threads:[~2001-05-18  0:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-17 22:57 Chris Evans
2001-05-17 22:59 ` Alan Cox
2001-05-17 23:51   ` Chris Evans
2001-05-18  0:32     ` David Schwartz [this message]
2001-05-18  8:32       ` Olaf Titz
2001-05-18 17:24 ` Kurt Roeckx
2001-05-18 20:02   ` Alan Cox
2001-05-18 20:52     ` Kurt Roeckx

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=NCBBLIEPOCNJOAEKBEAKAEPJPBAA.davids@webmaster.com \
    --to=davids@webmaster.com \
    --cc=chris@scary.beasts.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®