args, bool setSysArgv = true)
// during an initial "import clr", and the world ends shortly thereafter.
// This is probably masking some bad mojo happening somewhere in Runtime.Initialize().
delegateManager = new DelegateManager();
- Runtime.Initialize();
+ Runtime.Initialize(initSigs);
initialized = true;
Exceptions.Clear();
diff --git a/src/runtime/runtime.cs b/src/runtime/runtime.cs
index b08a56622..b6563c445 100644
--- a/src/runtime/runtime.cs
+++ b/src/runtime/runtime.cs
@@ -206,11 +206,11 @@ public class Runtime
///
/// Initialize the runtime...
///
- internal static void Initialize()
+ internal static void Initialize(bool initSigs)
{
if (Py_IsInitialized() == 0)
{
- Py_Initialize();
+ Py_InitializeEx(initSigs ? 1 : 0);
}
if (PyEval_ThreadsInitialized() == 0)
@@ -604,6 +604,9 @@ internal static unsafe long Refcount(IntPtr op)
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern void Py_Initialize();
+ [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
+ internal static extern void Py_InitializeEx(int initsigs);
+
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
internal static extern int Py_IsInitialized();
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy