Add more EINTR checks for locking.