-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add PHP_IPC_PRIVATE constant #5527
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
Conversation
I don't think we want to expose this constant directly from core. It should be part of the shm exts (possibly defined by both, if not yet defined). |
Or maybe defined by both under different prefixes, dunno. |
Well, it's actually about (at least) three extensions. Not sure, if I like how I've done it now (might be confusing, especially for the docs). I think I wouldn't like three differently named constants either. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really have a good suggestion of how to handle this :(
This constant makes `IPC_PRIVATE` available to userland, which is useful for `shmop_open()` and `sem_get()`, for instance.
We move the definition of `PHP_IPC_PRIVATE` to the three extensions which actually can use it, but avoid duplicate definition.
I've mailed internals. |
The conditional definition from commit a33d2f3 seems reasonable to me. Perhaps the constant should be named
|
Thinking about this again, I do no longer think it is a good idea to use the same name. This can bite us, if, for instance, another extension defines the constant with another value. The proper way forward would be to define different constants for the different extensions, but apparently there is not much interested in having these, so I'm closing this PR. |
This constant makes
IPC_PRIVATE
available to userland, which isuseful for
shmop_open()
andsem_get()
, for instance.