Skip to contentSkip to conversation

odd socket behavior

DISCUSSION Phy Prabab 4 participants 4 messages Aug 30, 2005 – Sep 2, 2005

lore
Share & tools
lore

Phy Prabab

author
#0 lore raw

Hello all,

I am seeing something odd w/sockets. I have an app that opens and closes network sockets. When the app terminates it releases all fd (sockets) and exists, yet running netstat after the app terminates still shows the sockets as open! Am I doing something wrong or is this something that is normal?

TIA!
Phy

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#1 lore raw

The socket is probably just lingering. Check the socket manual page in section 7 (man 7 socket) for more information.

Quoted 21 lines · you

Hello all,

I am seeing something odd w/sockets. I have an app that opens and closes network sockets. When the app terminates it releases all fd (sockets) and exists, yet running netstat after the app terminates still shows the sockets as open! Am I doing something wrong or is this something that is normal?

TIA!
Phy

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Phy Prabab
Quoted 8 lines · Phy Prabab

Hello all,

I am seeing something odd w/sockets. I have an app that opens and closes network sockets. When the app terminates it releases all fd (sockets) and exists, yet running netstat after the app terminates still shows the sockets as open! Am I doing something wrong or is this something that is normal?

What do you see with lsof? Is there a process associated?

I'm seeing something related with 2.6.13...

Signature · 3 lines
   -bill davidsen ([email protected])
"The secret to procrastination is to put things off until the
 last possible moment - but no longer"  -me
#3 lore raw
In reply to Phy Prabab
Quoted 8 lines · Phy Prabab

Hello all,

I am seeing something odd w/sockets. I have an app that opens and closes network sockets. When the app terminates it releases all fd (sockets) and exists, yet running netstat after the app terminates still shows the sockets as open! Am I doing something wrong or is this something that is normal?

Do you shutdown(2) them? Are these listening sockets?