summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2022-12-29 01:36:37 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2022-12-29 01:36:37 +0000
commitd28da41cb295e04c9903a21219a603dd5174bfd9 (patch)
tree6dfe4865b976b9289cd9cb211192c03267eadd57 /sys/kern/kern_exit.c
parent6517cf72435fb938a988419f1a66a9b4e9229773 (diff)
Add ktrace struct tracepoints for siginfo_t to the kernel side of
waitid(2) and __thrsigdivert(2) and teach kdump(1) to handle them. Also report more from the siginfo_t inside PSIG tracepoints. ok mpi@
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index afdba76e21d..7860c65eeda 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.209 2022/12/19 00:22:12 guenther Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.210 2022/12/29 01:36:36 guenther Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -692,8 +692,13 @@ sys_waitid(struct proc *q, void *v, register_t *retval)
error = dowait6(q, idtype, SCARG(uap, id), NULL,
options, NULL, &info, retval);
- if (error == 0)
+ if (error == 0) {
error = copyout(&info, SCARG(uap, info), sizeof(info));
+#ifdef KTRACE
+ if (error == 0 && KTRPOINT(q, KTR_STRUCT))
+ ktrsiginfo(q, &info);
+#endif
+ }
if (error == 0)
*retval = 0;
return (error);