fork of 9front i guess
Go to file
cinap_lenrek 08d6b0f043 kernel: improve diagnostics by reversing the roles of Proc.parentpid and Proc.parent
for better system diagnostics, we *ALWAYS* want to record the parent
pid of a user process, regardless of if the child will post a wait
record on exit or not.

for that, we reverse the roles of Proc.parent and Proc.parentpid so
Proc.parentpid will always be set on rfork() and the Proc.parent
pointer will point to the parent's Proc structure or is set to nil
when no wait record should be posted on exit (RFNOWAIT flag).

this means that we can get the pid of the original parent process
from /proc, regardless of the the child having rforked with the
RFNOWAIT flag. this improves the output of pstree(1) somewhat if
the parent is still alive. note that theres no guarantee that the
parent pid is still valid.

the conditions are unchanged:

a user process that will post wait record has:

up->kp == 0 && up->parent != nil && up->parent->pid == up->parentpid

the boot process is:

up->kp == 0 && up->parent == nil && up->parentpid == 0

and kproc's have:

up->kp != 0 && up->parent == nil && up->parentpid == 0
2019-12-01 17:57:14 +01:00
386 ape: floating point improvements (thanks spew) 2018-05-24 13:40:44 +01:00
68000 add signed fixed size integer typedefs 2018-05-12 19:19:52 +02:00
68020 ape: floating point improvements (thanks spew) 2018-05-24 13:40:44 +01:00
acme win: fix typo 2018-08-02 14:37:07 -04:00
adm/timezone timezones: change DST timezone string for South Australia 2019-11-20 11:49:16 +10:30
amd64 Include integer limits from generic stdint.h in system-specific stdint.h 2019-09-06 18:01:52 -07:00
arm ape: floating point improvements (thanks spew) 2018-05-24 13:40:44 +01:00
arm64 Include integer limits from generic stdint.h in system-specific stdint.h 2019-09-06 18:01:52 -07:00
lib lib: update pci database 2019-05-05 14:36:11 -07:00
mips ape: floating point improvements (thanks spew) 2018-05-24 13:40:44 +01:00
power ape: floating point improvements (thanks spew) 2018-05-24 13:40:44 +01:00
power64 add signed fixed size integer typedefs 2018-05-12 19:19:52 +02:00
rc rc-httpd: serve markdown with text/plain content-type 2019-06-20 16:26:03 +09:30
sparc ape: floating point improvements (thanks spew) 2018-05-24 13:40:44 +01:00
sparc64 ape: floating point improvements (thanks spew) 2018-05-24 13:40:44 +01:00
spim add signed fixed size integer typedefs 2018-05-12 19:19:52 +02:00
sys kernel: improve diagnostics by reversing the roles of Proc.parentpid and Proc.parent 2019-12-01 17:57:14 +01:00
.hgignore remove accidentally pushed change to .hgignore 2017-04-19 10:16:00 +00:00