summaryrefslogtreecommitdiffstats
path: root/Modules/signalmodule.c
diff options
context:
space:
mode:
authorSaiyang Gou <gousaiyang@163.com>2020-02-13 07:47:42 (GMT)
committerGitHub <noreply@github.com>2020-02-13 07:47:42 (GMT)
commit7514f4f6254f4a2d13ea8e5632a8e5f22b637e0b (patch)
tree9010a9077eaee0c66eea85e36f60086de6fba731 /Modules/signalmodule.c
parent597ebed748d0b0c061f8c108bd98270d103286c1 (diff)
downloadcpython-7514f4f6254f4a2d13ea8e5632a8e5f22b637e0b.zip
cpython-7514f4f6254f4a2d13ea8e5632a8e5f22b637e0b.tar.gz
cpython-7514f4f6254f4a2d13ea8e5632a8e5f22b637e0b.tar.bz2
bpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`, `resource`, `shutil`, `signal`, `syslog` (GH-18407)
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r--Modules/signalmodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index 693b90b..a197673 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -1236,6 +1236,10 @@ signal_pthread_kill_impl(PyObject *module, unsigned long thread_id,
{
int err;
+ if (PySys_Audit("signal.pthread_kill", "ki", thread_id, signalnum) < 0) {
+ return NULL;
+ }
+
err = pthread_kill((pthread_t)thread_id, signalnum);
if (err != 0) {
errno = err;