Why don signals interrupt system calls anymore?
{ZW} By default GNU libc uses the BSD semantics for signal(), unlike Linux libc 5 which used System V semantics. This is partially for compatibility with other systems and partially because the BSD semantics tend to make programming with signals easier. There are three differences: • BSD-style signals that occur in the middle of a system call do not affect the system call; System V signals cause the system call to fail and set errno to EINTR. • BSD signal handlers remain installed once triggered. System V signal handlers work only once, so one must reinstall them each time. • A BSD signal is blocked during the execution of its handler. In other words, a handler for SIGCHLD (for example) does not need to worry about being interrupted by another SIGCHLD. It may, however, be interrupted by other signals. There is general consensus that for `casual’ programming with signals, the BSD semantics are preferable. You don’t need to worry about system calls returning EINTR, and you don’t need to