| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
`NODE_RTLD_GLOBAL=true` set `RTLD_GLOBAL` flag when loading module
|
If your PR requires changes to libuv (files in deps/uv), could you open a PR there first? |
Sorry, something went wrong.
|
Sure, I will do that right now. Thanks |
Sorry, something went wrong.
|
Thanks. Closing this for now. |
Sorry, something went wrong.
|
I've created a PR in libuv there : libuv/libuv#635 |
Sorry, something went wrong.
* add constants for dlopen flags, which are needed for dlopen's flag passing. * introduce an optional parameter for process.dlopen(), allowing to pass dlopen flags (using values from os.constants.dlopen). If no flags are passed, the default behavior is to load the library with RTLD_LAZY (perform lazy binding) and RTLD_LOCAL (symbols are available only locally). PR-URL: #12794 Refs: #4105 Refs: libuv/libuv#1331 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* add constants for dlopen flags, which are needed for dlopen's flag passing. * introduce an optional parameter for process.dlopen(), allowing to pass dlopen flags (using values from os.constants.dlopen). If no flags are passed, the default behavior is to load the library with RTLD_LAZY (perform lazy binding) and RTLD_LOCAL (symbols are available only locally). PR-URL: nodejs#12794 Refs: nodejs#4105 Refs: libuv/libuv#1331 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
| Back | FazBrowse Home | New Git URL |
Setting the environment variable NODE_RTLD_GLOBAL to true set RTLD_GLOBAL flag when loading module.
This pull request is motivated by the fact that dlopen does not have the same behavior on MacOS X and Linux (cf. dlopen man page) :
RTLD_LOCAL This is the converse of RTLD_GLOBAL, and the default if neither flag is specified.I was not sure what name would be the best to use for this purpose, so this is a first suggestion, but I'd be happy to change them. Also, I've implemented that as an opt-in mode, with as few changes as I could, but I'd be also happy to extend the idea and provide more flexibility.
Note : I'm no Windows expert, so I was not sure how what to do for this implementation.
Many thanks in advance for considering this patch.