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 is the difference between close() and shutdown()?
What is the purpose of socket?
What is a sae socket?
How do I get my server to find out the clients address / host- name?
After the chroot(), calls to socket() are failing. Why?
What are socket exceptions? What is out-of-band data?
How to find other end of unix socket connection?
How do I get the port number for a given service?
How can I write a multi-homed server?
Where can a get a library for programming sockets?
Why do I get connection refused when the server is not running?
What is LILO?