interrupted system call EINTR handling?
Posted on 2003-10-31
I m getting EINTR when attempting pthread_create. A solution that i found was that if pthread_create fails and errno is EINTR then pthread_create can be retried. This works for me. But now the problem is that there are many system calls which behave similarly and i cannot go ahead and putin a wrapper for each one those. Is there any centralized way of handling this thing? I heard setting SA_RESTART flag for some signal. But how should the exact implementation for the same should go? Is there any example signal handling code someone can give? Or is there any other proper way of handling this issue?