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 ec7c09b commit 7565586Copy full SHA for 7565586
Python/frozenmain.c
@@ -78,8 +78,14 @@ Py_FrozenMain(int argc, char **argv)
78
#ifdef MS_WINDOWS
79
PyInitFrozenExtensions();
80
#endif /* MS_WINDOWS */
81
- if (argc >= 1)
82
- Py_SetProgramName(argv_copy[0]);
+ if (argc >= 1) {
+ status = PyConfig_SetString(&config, &config.program_name,
83
+ argv_copy[0]);
84
+ if (PyStatus_Exception(status)) {
85
+ PyConfig_Clear(&config);
86
+ Py_ExitStatusException(status);
87
+ }
88
89
90
status = Py_InitializeFromConfig(&config);
91
PyConfig_Clear(&config);
0 commit comments