summaryrefslogtreecommitdiff
path: root/Lib/pty.py
diff options
context:
space:
mode:
authorSaiyang Gou <gousaiyang@163.com>2020-02-04 16:15:00 -0800
committerGitHub <noreply@github.com>2020-02-05 11:15:00 +1100
commit95f60010219e142a436fae18e1695cbc45407afe (patch)
treef908dd8bad7c24219c72f6602d47f1496a4baf86 /Lib/pty.py
parent40e547dfbb9052ca0c667b242f6825ed1c23c195 (diff)
downloadcpython-git-95f60010219e142a436fae18e1695cbc45407afe.tar.gz
bpo-39184: Add audit events to command execution functions in os and pty modules (GH-17824)
Diffstat (limited to 'Lib/pty.py')
-rw-r--r--Lib/pty.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/pty.py b/Lib/pty.py
index e841f12f3e..a32432041f 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)