mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 05:31:44 +00:00
avoid loading pypy when python is already loaded
This commit is contained in:
@@ -71,6 +71,12 @@ static int uwsgi_pypy_init() {
|
||||
size_t rlen = 0;
|
||||
char *buffer = NULL;
|
||||
|
||||
void *is_cpython_loaded = dlsym(RTLD_DEFAULT, "Py_Initialize");
|
||||
if (is_cpython_loaded) {
|
||||
uwsgi_log("!! Loading both PyPy and CPython in the same process IS PURE EVIL AND IT IS NOT SUPPORTED !!!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (upypy.lib) {
|
||||
upypy.handler = dlopen(upypy.lib, RTLD_NOW | RTLD_GLOBAL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user