public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jlarmour@redhat.com>
To: Gary Thomas <gthomas@redhat.com>
Cc: "Trenton D. Adams" <tadams@extremeeng.com>,
	eCos mailing list <ecos-discuss@sources.redhat.com>
Subject: Re: [ECOS] Misguided error code in net code?
Date: Thu, 19 Jul 2001 19:54:00 -0000	[thread overview]
Message-ID: <3B579D74.F9516772@redhat.com> (raw)
In-Reply-To: <XFMail.20010719171051.gthomas@redhat.com>

Gary Thomas wrote:
> 
> On 19-Jul-2001 Trenton D. Adams wrote:
> > I just ran a test sending a big string from eCos over the network.  My
> > one end terminated prematurely because I forgot to put in a loop because
> > my buffer is only 8K.  Anyhow, on the eCos end I got an error of 22
> > (EINVAL) from send.  I could be wrong, but this seems like a pretty
> > weird error when the other end drops the connection.  I would have
> > expected ECONNRESET.
> >
> 
> I disagree - your request sounds pretty "invalid" to me.
> 
> Honestly, most of this stuff (like what errors get returned when) come
> from the standard BSD stack we're using - code that's been out there for
> twenty years.  (The numeric values may be different, but the codes the same)

While that's true, the world moves on, and the upcoming update to POSIX
1003.1 now says it should return EPIPE (or possibly ECONNRESET). After a
brief look, it's probably returning EINVAL at line 228 of
sys/netinet/tcp_usrreq.c but I don't know for sure. Even so, I couldn't be
sure that changing that to ECONNRESET is appropriate because I wouldn't
know what other circumstances could cause this to happen. Trenton, if
you're sufficiently bothered, feel free to investigate.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/

  reply	other threads:[~2001-07-19 19:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-19 15:40 Trenton D. Adams
2001-07-19 16:11 ` Gary Thomas
2001-07-19 19:54   ` Jonathan Larmour [this message]
2001-07-20  7:37     ` Trenton D. Adams
2001-07-20  7:43       ` Jonathan Larmour
2001-07-20  8:06         ` Trenton D. Adams
2001-07-20  8:14           ` Jonathan Larmour
2001-07-20  7:32   ` Trenton D. Adams

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=3B579D74.F9516772@redhat.com \
    --to=jlarmour@redhat.com \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=gthomas@redhat.com \
    --cc=tadams@extremeeng.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).