Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Socket accept() never return when shutting down the socket with another thread: (2 Items)
   
Socket accept() never return when shutting down the socket with another thread  
Hi,

I am testing the behavior of a socket when it is in the accept () state waiting for a connection, and then it is shut 
down by another thread. 

In this case, in Linux the accept function is interrupted and caused to return with an error.
However, in QNX the accept doesn't return when shutting down the socket.

I would like to know if this is a normal behavior in QNX? or there some settings to be set to cause the accept() to 
return?

(Socket type used: SOCK_STREAM)

BR,
Ilyas
Re: Socket accept() never return when shutting down the socket with another thread  
This is the code I run.

In Linux it doesn't block, but in QNX it blocks forever! 
Attachment: Text testaccept.cpp 2.39 KB