patchlwIP - A Lightweight TCP/IP stack - Patches: patch #5851, Use EMFILE to set errno on...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5851: Use EMFILE to set errno on alloc_socket error

Submitter:  Frédéric Bernon <fbernon>
Submitted:  Wed 04 Apr 2007 05:15:56 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  fbernon Open/Closed:  Closed
Planned Release:  None

Thu 05 Apr 2007 04:50:12 PM UTC, comment #4: 

Check in

Frédéric Bernon <fbernon>
Group Member
Wed 04 Apr 2007 06:06:33 PM UTC, comment #3: 

Ok with you for ENFILE. I will commit tomorrow evening...

Frédéric Bernon <fbernon>
Group Member
Wed 04 Apr 2007 05:46:00 PM UTC, comment #2: 

ENFILE seems better since the file descriptors are gone for the whole lwip 'system' not only one thread (which I would take as the process in an embedded system).
This leads to misunderstandings when lwip is run under a multiprocessing system like unix or windows, but I wouldn't care for that since the error should be from the lwip point of view...

Simon Goldschmidt <goldsimon>
Group administrator
Wed 04 Apr 2007 05:21:18 PM UTC, comment #1: 

Or ENFILE (File table overflow) ? We can read in :

http://www.opengroup.org/onlinepubs/009695399/functions/socket.html

"the socket() function shall fail if:
...
[EMFILE]
    No more file descriptors are available for this process.
[ENFILE]
    No more file descriptors are available for the system.
..."


Frédéric Bernon <fbernon>
Group Member
Wed 04 Apr 2007 05:15:56 PM UTC, original submission:  

When we got an error on alloc_socket (used in lwip_accept and lwip_socket), we set errno to ENOBUFS. I think EMFILE (/* Too many open files */) would be a better value to identify this kind of problem...

I propose to change that...

Frédéric Bernon <fbernon>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #12398:  alloc_socket.patch added by fbernon (782B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by fbernon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-04-05 fbernon StatusIn Progress Done
        Open/ClosedOpen Closed
    2007-04-04 fbernon Attached File- Added alloc_socket.patch, #12398
        StatusNone In Progress

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code