Closing an accepting BSD socket from a different thread


Stephan Gatzka
 

Hello!

I've a thread blocking on an zsock_accept(). After a certain time another thread decides that this socket is no longer required and calls zsock_close() on that socket. Now the thread blocking on zsock_accept() crashes horribly deep down in zephyrs socket implementation.

My question is how I can safely "unblock" the thread waiting in the zsock_accept()?

Thanks,
Stephan

Join users@lists.zephyrproject.org to automatically receive all group messages.