Socket descriptors not freed on close
I am facing a wired problem.The socket descriptor is not free (entry persists in /proc/pid/fd)
even though it is closed.
Code snippet is
Re: Socket descriptors not freed on close
The issue has been resolved..
Actually the sockets were getting freed but same fd was getting reallocated immediately.
As the same socket fd were reused, it was thought as if the descriptor was not getting released...
It was verified using netstat, /proc/<pid>/fd,/proc/net/tcp,/proc/net/raw and strace.
/proc/<pid>/fd, /proc/net/tcp OR /proc/net/raw... (depending on the socket type) are very good debugging tools for verifying socket usage in process.
|All times are GMT +5.5. The time now is 00:44.|