PDA

View Full Version : 2.4 - If bind() fails, what should I do with the descriptor?


Loco
07-24-2002, 05:35 PM
Taken from the original FAQ.

2.4 - If bind() fails, what should I do with the socket descriptor?

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.