[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #52684] Should read() return ETIMEDOUT on a timeout?
From: |
Douglas |
Subject: |
[lwip-devel] [bug #52684] Should read() return ETIMEDOUT on a timeout? |
Date: |
Sun, 17 Dec 2017 07:27:42 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 |
URL:
<http://savannah.nongnu.org/bugs/?52684>
Summary: Should read() return ETIMEDOUT on a timeout?
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: ourairquality
Submitted on: Sun 17 Dec 2017 12:27:41 PM UTC
Category: sockets/netconn
Severity: 3 - Normal
Item Group: Change Request
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
lwIP version: git head
_______________________________________________________
Details:
Noticed that read() does not return ETIMEDOUT on a blocked read timeout,
rather EWOULDBLOCK. Looking at the Linux man pages it appears that it should
return ETIMEDOUT if blocked, and that EWOULDBLOCK has a meaning for
non-blocking reads. This appears to make writing portable code a little more
difficult. There is a note in the changelog about not using ETIMEDOUT, and
perhaps there is a good reason?
A possible change to src/api/err.c
static const int err_to_errno_table[] = {
...
- EWOULDBLOCK, /* ERR_TIMEOUT -3 Timeout */
+ ETIMEDOUT, /* ERR_TIMEOUT -3 Timeout */
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?52684>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #52684] Should read() return ETIMEDOUT on a timeout?,
Douglas <=