socket closing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,
I have a server program that as far as I can tell correctly opens and closes
sockets to clients.

However, after a while, (A LONG TIME) my sockets build up and dont get
closed.  I have insrumented my code to make sure I am closing any file
descriptor I receive over via accept.

For the first 2 hours, when I do a socklist, I see just as many sockets for
my server program as there are clients

After 2 hours or so though, the sockets keep building up and the file
descriptors I get from accept kep increasing.

My question is, how do I tell what these (UNCLOSED) file descriptors point
to ?

I can so a stat on /proc/PID/fd/FILE and I get something like this:
stat /proc/10881/fd/44
File: "/proc/10881/fd/44" -> "socket:[1041079]"
Size: 64         Blocks: 2         Symbolic Link
Access: (0700/lrwx------)         Uid: (  501/    grao)  Gid: (  501/   
grao)
Device: 4          Inode: 713130028  Links: 1
Access: Tue Apr 24 12:10:20 2001
Modify: Tue Apr 24 12:10:20 2001
Change: Tue Apr 24 12:10:20 2001

How do I get more info on that file descriptor so I can debug where I am
going wrong?

Thanks
Lee


______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux