Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 875e445 commit 785e65fCopy full SHA for 785e65f
Python/frozenmain.c
@@ -54,6 +54,12 @@ Py_FrozenMain(int argc, char **argv)
54
Py_ExitStatusException(status);
55
}
56
57
+ PyInterpreterState *interp = PyInterpreterState_Get();
58
+ if (_PyInterpreterState_SetRunningMain(interp) < 0) {
59
+ PyErr_Print();
60
+ exit(1);
61
+ }
62
+
63
#ifdef MS_WINDOWS
64
PyWinFreeze_ExeInit();
65
#endif
@@ -83,6 +89,9 @@ Py_FrozenMain(int argc, char **argv)
83
89
84
90
PyWinFreeze_ExeTerm();
85
91
92
93
+ _PyInterpreterState_SetNotRunningMain(interp);
94
86
95
if (Py_FinalizeEx() < 0) {
87
96
sts = 120;
88
97
0 commit comments