mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-39184: Add audit events to command execution functions in os and pty modules (GH-17824)
This commit is contained in:
parent
40e547dfbb
commit
95f6001021
5 changed files with 56 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue