If bind() fails, what should I do with the socket descriptor?
Answer / chaitanya
If you are exiting, I have been assured by Andrew that all unixes will close open file descriptors on exit. If you are not exiting though, you can just close it with a regular close() call.
| Is This Answer Correct ? | 1 Yes | 0 No |
What exactly does SO_REUSEADDR do?
What pieces of information make up a socket?
Where is the socket located?
How do I send [this] over a socket?
Are sockets files?
How would I put my socket in non-blocking mode?
How come select says there is data, but read returns zero?
How can I put a timeout on connect()?
What is the difference between connected and unconnected sockets?
What is af_inet in socket?
How can I be sure that UDP messages are received in order?
What is socket address with example?