Why do I keep getting EINTR from the socket calls?

Answer Posted / chaitanya

This isn't really so much an error as an exit condition. It means that the call was interrupted by a signal. Any call that might block should be wrapped in a loop that checkes for EINTR, as is done in the example code .

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many sockets can a port have?

643


How many socket connections can a server handle?

623


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

1294


What is the difference between read() and recv()?

1717


What is sae socket?

595


Why sockets are used?

666


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

1297


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

607


Why does the sockets buffer fill up sooner than expected?

1118


How does unix socket work?

658


How does a socket work?

629


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

1250


What is the purpose of socket?

665


Can a socket have multiple ports?

640


How can I write a multi-homed server?

1398