Posted on 2001-07-20
i am new to linux
i have a server program written in c.
its a socket server program.it creats a socket on port 1234 which is listining.then my program goes into an infinite loop for accepting client socket.
i close the program by pressing ctl-c .
i need a method to close the server program properly
so the i can close the Listining socket
Some time after closing the program using ctl-c ,the next time when i run the program ,i get error message ,"Socket already bound"
is there any method or linux command to close the socket
please help me