Skip to content

opcache: Use O_TMPFILE file lock if available #8634

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

Merged
merged 6 commits into from
Oct 9, 2023
Merged

Conversation

crrodriguez
Copy link
Contributor

Use O_TMPFILE if the kernel supports it to create the lock fd, this
has multiple advantages including not having to worry about naming,
permissions and the assurance that it will always go away cleanly
even on abnormal termination.

Use O_TMPFILE if the kernel supports it to create the lock fd, this
has multiple advantages including not having to worry about naming,
permissions and the assurance that it will always go away cleanly
even on abnormal termination.
@ramsey
Copy link
Member

ramsey commented May 26, 2022

Since I had to go look up O_TMPFILE, I'll drop this link here for others (and my future self 😉): https://www.gnu.org/software/libc/manual/html_node/Open_002dtime-Flags.html#index-O_005fTMPFILE

@crrodriguez
Copy link
Contributor Author

Since I had to go look up O_TMPFILE, I'll drop this link here for others (and my future self 😉): https://www.gnu.org/software/libc/manual/html_node/Open_002dtime-Flags.html#index-O_005fTMPFILE

This is not the correct manual page to reference. Use https://man7.org/linux/man-pages/man2/open.2.html.

@ramsey
Copy link
Member

ramsey commented May 26, 2022

Thanks for the clarification!

@adoy adoy removed this from the PHP 8.2 milestone Feb 16, 2023
Copy link
Member

@dstogov dstogov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any problems.
Sorry, I missed this PR in May.

@dstogov dstogov merged commit 9ff6220 into php:master Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants