Unix Socket Programming Question:

Download Job Interview Questions and Answers PDF

Why do I keep getting EINTR from the socket calls?

Unix Socket Programming Interview Question
Unix Socket Programming Interview Question

Answer:

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 .

Download Unix Socket Programming Interview Questions And Answers PDF

Previous QuestionNext Question
What are socket exceptions? What is out-of-band data?Is there any advantage to handling the signal, rather than just ignoring it and checking for the EPIPE error? Are there any useful parameters passed to the signal catching function?