summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSaiyang Gou <gousaiyang@163.com>2020-02-05 00:15:00 (GMT)
committerGitHub <noreply@github.com>2020-02-05 00:15:00 (GMT)
commit95f60010219e142a436fae18e1695cbc45407afe (patch)
treef908dd8bad7c24219c72f6602d47f1496a4baf86 /Lib
parent40e547dfbb9052ca0c667b242f6825ed1c23c195 (diff)
downloadcpython-95f60010219e142a436fae18e1695cbc45407afe.zip
cpython-95f60010219e142a436fae18e1695cbc45407afe.tar.gz
cpython-95f60010219e142a436fae18e1695cbc45407afe.tar.bz2
bpo-39184: Add audit events to command execution functions in os and pty modules (GH-17824)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/pty.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/pty.py b/Lib/pty.py
index e841f12..a324320 100644
--- a/Lib/pty.py
+++ b/Lib/pty.py
@@ -8,6 +8,7 @@
from select import select
import os
+import sys
import tty
__all__ = ["openpty","fork","spawn"]
@@ -151,6 +152,7 @@ def spawn(argv, master_read=_read, stdin_read=_read):
"""Create a spawned process."""
if type(argv) == type(''):
argv = (argv,)
+ sys.audit('pty.spawn', argv)
pid, master_fd = fork()
if pid == CHILD:
os.execlp(argv[0], *argv)