socket programming

Sven Eschenberg
Fri Nov 7 13:10:00 GMT 2008

The socket is not bound to a process anymore after killign the process. 
But it might depend on the type of socket, if the port will be available 
For further information see the socket api documentation.

I assume you are using stream sockets, if so, this is realted to the 
inner workings of the tcp protocol.

netstat should give you an overview of you sockets and their states.



ranjith kumar schrieb:
> hi,
>          I wrote a two .c files which communicates through socket programming.
> I am getting "bind error" when I tried to run those programms again.
> I know that "ipcs" command will display all shared memories currently
> being used.
> My question is there any way(command) to  know all sockets currently
> created/used in unix.
> Even after I kill a prosess which creates a socket and binds to it,
> why its socket is not freed.
> Thanks in advance

More information about the Gcc-help mailing list