optimized hold time of lock for read and write of fcntl