Handle interrupted system calls.