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 are Sockets?
What are the pros/cons of select(), non-blocking I/O and SIGIO?
What is sae socket?
Is a socket a file?
What is difference between socket and websocket?
What is active unix domain sockets?
What is a socket set used for?
Why does it take so long to detect that the peer died?
How come I get address already in use from bind()?
What are socket exceptions? What is out-of-band data?
Are unix sockets faster than tcp?
What's better 6pt or 12pt sockets?