POSIX system calls return with EINTR if a signal is sent to the process. Most uses of system calls need to be changed to looping until success. The fsync and fdatasync implementation in the native io::file need to do this too. A close call on non-Linux platforms also has to do this, but must not loop on Linux (thanks for nothing POSIX!).