EINTR and PC Loser-Ing: The “Worse Is Better” Case Study (2011)
This discussion seems to ignore the fact that being blocked in a &quot;long-running system call&quot; is the normal state for many (most?) Unix services.<p>If you look at `ps ax` on your system, you&#x27;ll likely see about a hundred processes. But if you look at `top`, you&#x27;ll see only a handful of processes having non-zero CPU usage. Why? Because most processes are just waiting (in a system call) for something to do. A web server is blocked in a select&#x2F;poll&#x2F;epoll() call waiting for a connection. Your shell is blocked in a read() call waiting for you to type something. This is just the normal way that a main loop is implemented on Unix.<p>When you kill one of these processes, they need a way to break out of their loop and with the EINTR approach, they get a chance to break and exit.<p>I&#x27;m far from convinced that a &quot;majority&quot; of services want to just catch signals and carry on.