hold_lock_file_for_append(): restore errno before returning