Skip to content

Commit ce4690b

Browse files
committed
deploy-stub: disable PYTHONINSPECT mechanism in +opt builds
1 parent e443acd commit ce4690b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandatool/src/deploy-stub/deploy-stub.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,10 @@ int Py_FrozenMain(int argc, char **argv)
400400
{
401401
char *p;
402402
int n, sts = 1;
403-
int inspect = 0;
404403
int unbuffered = 0;
404+
#ifndef NDEBUG
405+
int inspect = 0;
406+
#endif
405407

406408
#if PY_MAJOR_VERSION >= 3 && !defined(WIN_UNICODE)
407409
int i;
@@ -433,8 +435,10 @@ int Py_FrozenMain(int argc, char **argv)
433435
Py_NoSiteFlag = 0;
434436
Py_NoUserSiteDirectory = 1;
435437

438+
#ifndef NDEBUG
436439
if ((p = Py_GETENV("PYTHONINSPECT")) && *p != '\0')
437440
inspect = 1;
441+
#endif
438442
if ((p = Py_GETENV("PYTHONUNBUFFERED")) && *p != '\0')
439443
unbuffered = 1;
440444

@@ -603,8 +607,10 @@ int Py_FrozenMain(int argc, char **argv)
603607
else
604608
sts = 0;
605609

610+
#ifndef NDEBUG
606611
if (inspect && isatty((int)fileno(stdin)))
607612
sts = PyRun_AnyFile(stdin, "<stdin>") != 0;
613+
#endif
608614

609615
#ifdef MS_WINDOWS
610616
PyWinFreeze_ExeTerm();

0 commit comments

Comments
 (0)
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