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



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

Post New Answer

More Unix Socket Programming Interview Questions

How can I read only one character at a time?

1 Answers  


What is Mac, and how is it different from PC? Which one is better for professional users, and why

1 Answers   Evolving Systems, IBM,


When should I use UDP instead of TCP?

1 Answers  


What are socket exceptions? What is out-of-band data?

1 Answers  


Why does it take so long to detect that the peer died?

0 Answers  






Why do we need socket programming?

0 Answers  


What is a deep well socket?

0 Answers  


Where is the socket located?

0 Answers  


How are unix domain sockets implemented?

0 Answers  


What's the difference between impact sockets and regular sockets?

0 Answers  


Why do I get connection refused when the server is not running?

1 Answers  


system choose one for me on the connect() call? Should I bind() a port number in my client program, or let the?

0 Answers  


Categories