lib-bsd socket close issues

Chris Johns chrisj at rtems.org
Thu Apr 4 23:17:35 UTC 2019


On 5/4/19 4:53 am, Matthew J Fletcher wrote:
> Hi Sebastian
> 
> I used rtems_task_wake_after().
> 
> 
> On Thu, 4 Apr 2019, 18:22 Sebastian Huber, <sebastian.huber at embedded-brains.de
> <mailto:sebastian.huber at embedded-brains.de>> wrote:
> 
>     How do you wait. Is this a busy wait?
> 
>     ----- Matthew J Fletcher <amimjf at gmail.com <mailto:amimjf at gmail.com>> schrieb:
>     > replying to myself.
>     >
>     > With a 1 second pause between socket() and close() and 512 sockets it will
>     > still ENOBUFS,.. without calculating it properly thats easily 10 minutes
>     > since the first socket was allocated,. that must be enough time to start
>     > freeing the socket buffers internally.
>     >
>     >
>     > On Thu, 4 Apr 2019 at 16:47, Matthew J Fletcher <amimjf at gmail.com
>     <mailto:amimjf at gmail.com>> wrote:
>     >
>     > > Hi,
>     > >
>     > > I have noticed an issue with lib-bsd that the legacy stack does not have.
>     > >
>     > > If have a loop that does
>     > >
>     > > for (;;)
>     > > {
>     > >   wait(100) // milliseconds
>     > >   socket() // allocate
>     > >   close() // free
>     > > }

Are you able to make a small stand alone test?

Thanks
Chris




More information about the users mailing list