If bind() fails, what should I do with the socket descriptor?
Answer Posted / 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 |
Post New Answer View All Answers
How to find other end of unix socket connection?
How do I use TCP_NODELAY?
Why sockets are used?
What is the difference between SO_REUSEADDR and SO_REUSEPORT?
What is a socket address?
How can I tell when a socket is closed on the other end?
What is a socket connection?
Whats the difference between select() and poll()?
What is the purpose of socket?
How many sockets can a cpu have?
Why do I get EPROTO from read()?
How are unix domain sockets implemented?
Is tcp or unix socket faster?
What is socket address?
What's better 6pt or 12pt sockets?