This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: recv() returns ETIMEDOUT instead of EWOULDBLOCK.
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Sergei Organov <osv at javad dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 23 Sep 2008 08:27:54 -0600
- Subject: Re: [ECOS] recv() returns ETIMEDOUT instead of EWOULDBLOCK.
- References: <gbatk6$v10$1@ger.gmane.org>
Sergei Organov wrote:
> Hello,
>
> I'm using rather recent CVS eCos and noticed that recv() returns errno
> == ETIMEDOUT when timeout happens due to the use of SO_RCVTIMEO option
> on the socket (I'm using freebsd_net). However, both FreeBSD and Linux
> manpages specify that errno should be set to EWOULDBLOCK in this case.
> Moreover, RTEMS, that runs port of roughly the same FreeBSD TCP/IP
> stack, correctly returns EWOULDBLOCK, so this must be something
> eCos-specific I guess.
>
> Is this a bug? Any idea for a fix?
You could try changing this in
ecos/packages/net/bsd_tcpip/current/src/ecos/synch.c
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss