lockfile: allow reopening a closed but still locked file