Hi all
I found a similar question, but no summary.
While a local process is active, netstat and lsof show the info as follows
(names changed to protect the innocent):
$ netstat -aAn
d619600 tcp 0 0 192.0.0.111.4930 192.0.0.222.6001
ESTABLISHED
$ lsof
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
switch 1208 swtchtst 3u inet 0x0d619600 0t0 TCP
192.0.0.111:4930->192.0.0.222:6001 (ESTABLISHED)
This is during the connect. Then, after attempting to write to the socket,
the local process traps on a SIGPIPE because the ... well, that is what I
want to know.
netstat shows no info, lsof returns:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
switch 1208 swtchtst 3u inet 0t0 TCP can't read
inpcb at 0x00000000
My question is this: what has happened to the socket? Obviously, the local
process has not closed the socket, because lsof still shows an open fd.
Does this mean that the remote system has (a) executed a shutdown(2) on the
socket, (b) closed the socket, (c) ... something else?
The reason I am confused is that I thought if the socket is closed from the
remote end, netstat should show a TIME_WAIT, CLOSE_WAIT or FIN_WAIT_2, not
just disappear.
TIA
Gavin
Received on Tue Mar 27 2001 - 16:51:44 NZST