lockf(F_LOCK) requests a write lock, which requires the file to be open in write...