Earlier quoted context omitted.
> the most straightforward way is to keep around a zombie that just contains that information and ensures the only identifier available to userspace at the time continues to reference the same pid. Again, that's only really needed if the zombie process's parent has not yet died itself; in fact, this is also how Windows API operates: unless you call CloseHandle on the process descriptor obtained from the CreateProcess…
The handle solution is definitely better (which is why I mentioned pidfds -- I actually think it might be possible to do this today with SIG_IGN and PIDFD_GET_INFO but it's a little hacky) but Unix only had pids and most descendants only have pids too. In that paradigm the zombie solution is kind of inevitable (as with most other Unix hacks). My point was that it wasn't as simple as "just doing some more work in exit…
Not really, PIDs are unstable, so only the immediate parent of a child can reasonably do anything with a child's PID anyway, PPID is mostly useless; so when a process exits, set PPIDs of all its non-exitted children to 0 or -1, and reap all of its already dead children, recursively. Done!
> Reparenting is needed for standard Unix utilities that want to run in the background.
Well, okay? You don't need any changes in APIs for that.