Skip to content

Fix the replacement for shmget in Windows - #9946

Closed
TysonAndre wants to merge 3 commits into
php:PHP-8.1from
TysonAndre:fix-9944-windows-shm_get
Closed

TysonAndre wants to merge 3 commits into
php:PHP-8.1from
TysonAndre:fix-9944-windows-shm_get

Conversation

@TysonAndre

Copy link
Copy Markdown
Contributor

Closes #9944

https://man7.org/linux/man-pages/man2/shmget.2.html notes

The name choice IPC_PRIVATE was perhaps unfortunate, IPC_NEW
would more clearly show its function.

@TysonAndre
TysonAndre requested a review from cmb69 November 13, 2022 21:21
@TysonAndre
TysonAndre force-pushed the fix-9944-windows-shm_get branch 2 times, most recently from 0ea9e26 to 176c011 Compare November 13, 2022 21:51
Closes php#9944

https://man7.org/linux/man-pages/man2/shmget.2.html notes

   The name choice IPC_PRIVATE was perhaps unfortunate, IPC_NEW
   would more clearly show its function.
@TysonAndre
TysonAndre force-pushed the fix-9944-windows-shm_get branch from 176c011 to 8db6bd5 Compare November 13, 2022 22:00
Comment thread TSRM/tsrm_win32.c Resolved

@cmb69 cmb69 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the PR! The general solution looks good to me, but we likely need to figure out some details.

Comment thread TSRM/tsrm_win32.c Resolved
Comment thread TSRM/tsrm_win32.c Resolved
Comment thread TSRM/tsrm_win32.c Resolved

@cmb69 cmb69 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! I don't see a reasonable way to add a test case (adding something to ext/zend_test appears to be overkill), so this looks good to me.

Comment thread TSRM/tsrm_win32.c Resolved
Comment thread TSRM/tsrm_win32.c Resolved
@cmb69 cmb69 closed this in 7a983e2 Dec 13, 2022
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.

Windows C shmget(IPC_PRIVATE, ...) returns IPC_PRIVATE(0) instead of distinct id for new section

2 participants