Interrupted System Call

This is returned by the LinuxKernel if a system call was interrupted permaturely with a Signal before it was able to complete. You should probably retry the syscall again. This behavour can be changed on a signal by signal basis with sigaction(2).

The main exception to this is if you are using pause(2) in which case EINTR means that a signal was caught and handled.

<blatant-plagiarism copied-from="">

The areas you should check for this are any socket io calls (read(s), recv(s), write(s), send(s)) and any of the "status" calls such as select and poll...

You can call the function that was interrupted again immediately... Just wrap it in a loop... e.g.

while (...someConditional...) {

retVal = select(...);

if (retVal == -1) {

if (errno == EINTR) {



/* Check for other errnos & handle here */



Btw, the someConditional part in the loop is so you can set a flag to cause the thing to fall through... nothing more...

Technically, if you are setting all your threads doing socket io to ignore ALL (well, all allowed) signals then you should never see an EINTR but... it does not hurt to check for it ...