User-space interrupts
User-space interrupts
Posted Oct 12, 2021 23:45 UTC (Tue) by neilbrown (subscriber, #359)In reply to: User-space interrupts by anton
Parent article: User-space interrupts
Your description of EINTR roughly matches my understanding of ERESTART.
In many cases a syscall that returns EINTR should *not* be restarted. A blocking read is an obvious case. The application should be given the opportunity to choose whether to restart.
It *might* be possible for a platform (such as python) to require that syscalls which cannot be restarted don't get used. e.g. reads must be non-blocking. But that is a higher-level design choice than the libc syscall wrapper.