NWNX is loaded/injected on linux by specifying the "LD_PRELOAD" environment variable before starting the server.
This has the unintended side effect of causing all child processes spawned by NWNX plugins to inherit LD_PRELOAD and attempt to preload NWNX_Core.so again, causing these processes to immediately crash
If NWNX attempts to load outside of the nwn process, it will immediately throw a linker error:
symbol lookup error: /nwn/nwnx/NWNX_Core.so: undefined symbol: _ZN11CAppManager12CreateServerEv
This PR adds a workaround that will remove all entries with a NWNX_ prefix from the process level environment variables.
User and system environment variables should remain untouched.
NWNX is loaded/injected on linux by specifying the "LD_PRELOAD" environment variable before starting the server.
This has the unintended side effect of causing all child processes spawned by NWNX plugins to inherit LD_PRELOAD and attempt to preload NWNX_Core.so again, causing these processes to immediately crash
If NWNX attempts to load outside of the nwn process, it will immediately throw a linker error:
This PR adds a workaround that will remove all entries with a
NWNX_
prefix from the process level environment variables. User and system environment variables should remain untouched.