0

Main question I see following line in netstat. Does it means this socket doesn't belong to any process?

#>netstat -tpn|grep TIME_WAIT| head -1
tcp        0      0 ::ffff:127.0.0.1:5555       ::ffff:127.0.0.1:45845      TIME_WAIT   -

Extra question

In an multithread program can thread responsible for dealing with socket be already gone? (It's NOT in 'sleep' or 'uninterpretable sleep')?

3

No process owns that socket, the kernel keeps it around for possible cleanup. This answer and this IBM article explain more about the TIME_WAIT state.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.