Open mdavidsaver opened 5 years ago
The current shutdown sequence:
shutdown(socket, SHUT_RDWR);
close(socket);
thread.exitWait()
The problem with RTEMS can be avoided with:
shutdown(socket, SHUT_RDWR);
thread.exitWait()
close(socket);
However, this presents problems on targets other than Linux and RTEMS where shutdown() doesn't interrupt either accept() or recvfrom().
Running testChannelAccess on RTEMS (for the first time?) leaves worker threads hung in recvfrom() and accept(). On investigation I find that this results if a socket is close()d while concurrent accept() or recvfrom() is in progress.