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 |
If bind() fails, what should I do with the socket descriptor?
Why do we need socket programming?
What is difference between socket and websocket?
How can I read ICMP errors from connected UDP sockets?
What is af_inet in socket?
What is a deep well socket?
How come select says there is data, but read returns zero?
Are sockets files?
When should I use UDP instead of TCP?
When will my application receive SIGPIPE?
How do I use TCP_NODELAY?
How would I put my socket in non-blocking mode?