Skip to content

Fix GH-8923: error_log on Windows can hold the file write lock #8925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Jul 5, 2022

On Windows, closing a file which is locked may not immediately remove
the lock. The LockFileEx() documentation states:

| Therefore, it is recommended that your process explicitly unlock all
| files it has locked when it terminates.

We comply, and also use the macro LOCK_EX instead of the magic number
2.

On Windows, closing a file which is locked may not immediately remove
the lock.  The `LockFileEx()` documentation states:

| Therefore, it is recommended that your process explicitly unlock all
| files it has locked when it terminates.

We comply, and also use the macro `LOCK_EX` instead of the magic number
`2`.
@cmb69 cmb69 linked an issue Jul 5, 2022 that may be closed by this pull request
@cmb69
Copy link
Member Author

cmb69 commented Jul 5, 2022

This fix looks pretty uncontroversial to me, but I'll wait a few days before merging. Maybe there are some objections.

@cmb69 cmb69 closed this in 77e954a Jul 12, 2022
@cmb69 cmb69 deleted the cmb/gh8923 branch July 12, 2022 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error_log on Windows can hold the file write lock
1 participant