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


Please Help Members By Posting Answers For Below Questions

How do I convert a string into an internet address?

1038


What is socket address with example?

637


How to find other end of unix socket connection?

654


What are the pros/cons of select(), non-blocking I/O and SIGIO?

1102


What's the difference between a socket and a port?

604






What is a socket connection?

671


Are unix sockets faster than tcp?

636


Is socket a hardware or software?

665


What is the difference between a socket and a port?

615


What is a deep well socket?

683


Where is the socket located?

637


What is socket programming in java?

623


What is a socket file?

646


What is socket address?

747


How can I set the timeout for the connect() system call?

1245