From: palladin <p-a...@ya...> - 2013-09-18 07:55:10
|
Dear log4cplus devels, log4cplus 1.1.1-RC4 <https://sourceforge.net/projects/log4cplus/files/log4cplus-stable/1.1.1/> Linux version 2.6.32-279.22.1.37.0.el6.x86_64 (abuild@noriko) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) My application has hung after it have used log4cplus::helpers::Socket from log4cplus::helpers::ServerSocket::accept,e.g. log4cplus::helpers::Socket clientSocket = mServerSocket.accept(); clientSocket was put into log4cplus::thread::AbstractThread worker. Client socket was used in AbstractThread like Socket::read - this is blocking call and the root of issue. Then my application worked for some time and at the end I did clientSocket.close() from main thread. Due to the fact that log4cplus::helpers::Socket::read is blocking call - my application has hung on AbstractThread::join call. I would like to suggest a fiew fixes to this issue: 1) add non-blocking stuff to log4cplus::helpers::Socket - select or poll. 2) add to log4cplus::helpers::Socket interface system call shutdown( man 2 shutdown ). Sincerely, Taras Shypytiak. |