summaryrefslogtreecommitdiffstats
path: root/Modules/main.c
diff options
context:
space:
mode:
authorƁukasz Langa <lukasz@langa.pl>2024-07-22 11:04:08 (GMT)
committerGitHub <noreply@github.com>2024-07-22 11:04:08 (GMT)
commitdc93d1125f594ac7aece98558eaf33d09c348519 (patch)
treedb2bc23e9e74df4a9ce22a872c2825418597f57b /Modules/main.c
parentcad11a2bdceb6d4683ae5654ce555cdf5f191217 (diff)
downloadcpython-dc93d1125f594ac7aece98558eaf33d09c348519.zip
cpython-dc93d1125f594ac7aece98558eaf33d09c348519.tar.gz
cpython-dc93d1125f594ac7aece98558eaf33d09c348519.tar.bz2
gh-121957: Emit audit events for `python -i` and `python -m asyncio` (GH-121958)
Relatedly, emit the `cpython.run_startup` event from the Python version of `PYTHONSTARTUP` handling.
Diffstat (limited to 'Modules/main.c')
-rw-r--r--Modules/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 3c202c8..15ea49a 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -594,6 +594,10 @@ pymain_repl(PyConfig *config, int *exitcode)
return;
}
+ if (PySys_Audit("cpython.run_stdin", NULL) < 0) {
+ return;
+ }
+
if (!isatty(fileno(stdin))
|| _Py_GetEnv(config->use_environment, "PYTHON_BASIC_REPL")) {
PyCompilerFlags cf = _PyCompilerFlags_INIT;