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 |
How can I read only one character at a time?
What is Mac, and how is it different from PC? Which one is better for professional users, and why
1 Answers Evolving Systems, IBM,
When should I use UDP instead of TCP?
What are socket exceptions? What is out-of-band data?
Why does it take so long to detect that the peer died?
Why do we need socket programming?
What is a deep well socket?
Where is the socket located?
How are unix domain sockets implemented?
What's the difference between impact sockets and regular sockets?
Why do I get connection refused when the server is not running?
system choose one for me on the connect() call? Should I bind() a port number in my client program, or let the?