Please help me...
I'm working a project which is use a socket, datagram and port.
When the program is running and Ctrl-C pressed then the program is close, but the socket still open.
It's make my program can't run anymore even in Linux.
So when Ctrl-C pressed can I set my program run something to close the socket first, before the program close?
So I can run my program again.
Please help me to solve this problem.
Thanks for your help.
It's mean so much for me.