fix bug #273: retry flock if it fails with EINTR