freebsd-skq/lib/libkvm
Konstantin Belousov 5844bd058a jobc: rework detection of orphaned groups.
Instead of trying to maintain pg_jobc counter on each process group
update (and sometimes before), just calculate the counter when needed.
Still, for the benefit of the signal delivery code, explicitly mark
orphaned groups as such with the new process group flag.

This way we prevent bugs in the corner cases where updates to the counter
were missed due to complicated configuration of p_pptr/p_opptr/real_parent
(debugger).

Since we need to iterate over all children of the process on exit, this
change mostly affects the process group entry and leave, where we need
to iterate all process group members to detect orpaned status.

(For MFC, keep pg_jobc around but unused).

Reported by:	jhb
Reviewed by:	jilles
Tested by:	pho
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27871
2021-01-10 04:41:20 +02:00
..
tests Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
kvm_aarch64.h Chase r350037. 2019-07-16 16:02:20 +00:00
kvm_amd64.c Use __SCCSID for SCCS IDs in libkvm sources. 2018-05-22 15:52:22 +00:00
kvm_amd64.h Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
kvm_arm.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
kvm_arm.h Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
kvm_cptime.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
kvm_getcptime.3
kvm_geterr.3 kvm_geterr: handle kd == NULL in a deterministic/graceful manner 2017-03-21 19:02:17 +00:00
kvm_getloadavg.3
kvm_getloadavg.c Use __SCCSID for SCCS IDs in libkvm sources. 2018-05-22 15:52:22 +00:00
kvm_getpcpu.3
kvm_getprocs.3 Remove a commented out line before kvm_getprocs(3) 2017-03-19 23:04:58 +00:00
kvm_getswapinfo.3 Fix copy/paste mistake in kvm_getswapinfo(3) 2020-06-25 20:04:35 +00:00
kvm_getswapinfo.c Remove swblk_t. 2020-02-17 15:11:07 +00:00
kvm_i386.c Use __SCCSID for SCCS IDs in libkvm sources. 2018-05-22 15:52:22 +00:00
kvm_i386.h Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
kvm_kerndisp.3 Implement kvm_kerndisp 2020-02-06 13:21:59 +00:00
kvm_minidump_aarch64.c Always use 64-bit physical addresses for dump_avail[] in minidumps 2020-12-03 17:12:31 +00:00
kvm_minidump_amd64.c Always use 64-bit physical addresses for dump_avail[] in minidumps 2020-12-03 17:12:31 +00:00
kvm_minidump_arm.c Always use 64-bit physical addresses for dump_avail[] in minidumps 2020-12-03 17:12:31 +00:00
kvm_minidump_i386.c Always use 64-bit physical addresses for dump_avail[] in minidumps 2020-12-03 17:12:31 +00:00
kvm_minidump_mips.c Always use 64-bit physical addresses for dump_avail[] in minidumps 2020-12-03 17:12:31 +00:00
kvm_minidump_powerpc64_hpt.c [PPC64] Initial libkvm minidump implementation 2019-12-09 13:59:36 +00:00
kvm_minidump_powerpc64.c Always use 64-bit physical addresses for dump_avail[] in minidumps 2020-12-03 17:12:31 +00:00
kvm_minidump_riscv.c Always use 64-bit physical addresses for dump_avail[] in minidumps 2020-12-03 17:12:31 +00:00
kvm_mips.h Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
kvm_native.3 Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
kvm_nlist.3
kvm_open.3 Handle kd == NULL gracefully with kvm_close(3) 2017-03-20 18:28:22 +00:00
kvm_pcpu.c libkvm: catch up with pre-subtracated per-cpu addresses 2020-10-06 02:57:37 +00:00
kvm_powerpc64.c [PowerPC64LE] libkvm powerpc64le support. 2020-09-23 02:11:24 +00:00
kvm_powerpc64.h [PPC64] Initial libkvm minidump implementation 2019-12-09 13:59:36 +00:00
kvm_powerpc.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
kvm_private.c Always use 64-bit physical addresses for dump_avail[] in minidumps 2020-12-03 17:12:31 +00:00
kvm_private.h Always use 64-bit physical addresses for dump_avail[] in minidumps 2020-12-03 17:12:31 +00:00
kvm_proc.c jobc: rework detection of orphaned groups. 2021-01-10 04:41:20 +02:00
kvm_read.3
kvm_riscv.h Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
kvm_vnet.c Partially revert VNET change and expand VNET structure. 2020-02-17 11:08:50 +00:00
kvm.3 Implement kvm_kerndisp 2020-02-06 13:21:59 +00:00
kvm.c Partially revert VNET change and expand VNET structure. 2020-02-17 11:08:50 +00:00
kvm.h Implement kvm_kerndisp 2020-02-06 13:21:59 +00:00
Makefile Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00