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 often should I re-transmit un-acknowleged messages?

1 Answers  


Can multiple clients connect to same socket?

0 Answers  


What is af_inet in socket?

0 Answers  


What are raw sockets?

4 Answers   Axis Technologies,


Why do I get EPROTO from read()?

0 Answers  


How do Sockets Work?

1 Answers  


How can I listen on more than one port at a time?

1 Answers  


How come select says there is data, but read returns zero?

1 Answers  


What is socket address?

0 Answers  


What pieces of information make up a socket?

0 Answers  


Why does the sockets buffer fill up sooner than expected?

0 Answers  


Is socket a hardware or software?

0 Answers  


Categories