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 can I write a multi-homed server?
What is the function of socket?
Is tcp or unix socket faster?
Can multiple clients connect to same socket?
How can I tell when a socket is closed on the other end?
What exactly is a socket?
What does af mean in sockets?
Can multiple sockets use the same port?
How many socket connections can a server handle?
Why does it take so long to detect that the peer died?
How can I force a socket to send the data in its buffer?
What is a socket api?
How many sockets can a cpu have?
How do I use TCP_NODELAY?