lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #44032] LWIP_NETCONN_FULLDUPLEX: select might work on


From: Joel Cunningham
Subject: [lwip-devel] [bug #44032] LWIP_NETCONN_FULLDUPLEX: select might work on invalid/reused socket
Date: Mon, 16 Mar 2015 21:50:24 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0

Follow-up Comment #3, bug #44032 (project lwip):

Maybe I missed the mailing list discussion of LWIP_NETCONN_FULLDUPLEX, but is
that allowing multiple threads to operate on the same socket?

Even if we address the LwIP restriction of multiple threads using the same
socket, there is still the long standing limitation of FDs when implemented as
a simple index (restriction applies on *nix).

If you have two threads, one blocking on socket A and the other thread issues
a close(A), and then a call to socket() (which returns A), now the second
thread is operating on the new instance of socket A without ever knowing it
was closed.

It is my understanding that best practices for FD programming involves
avoiding closing a FD from a different thread than is using the FD (due to
this ambiguous FD instance problem).  The select use case seems to be a
violation of that best practice.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?44032>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]