locking a region of file with fcntl