Thread (73 messages) 73 messages, 7 authors, 2021-08-31

Re: [PATCH v6 2/2] tr2: log parent process name

From: Jeff Hostetler <hidden>
Date: 2021-08-02 15:23:37


On 8/2/21 6:22 AM, Ævar Arnfjörð Bjarmason wrote:
...
If anything the existing Windows version seems a bit unweildy, having to
apparently deal with cycles etc., I don't think that happens under
procfs, but maybe I'm missing some special-case.
It's been a while since I did the parent lookup on Windows, but...

Yes, on Windows we observed cases where a PID would be recycled
and a child process could have the same PID as an ancient ancestor
that had long since exited.

I don't think the cycle problem exists on Unix because IIRC a
child process' parent-PID is set to Init when the parent exits.

Windows does not update the child's parent-PID when the parent
exits, so if a recently-used PID is given to one of our child
processes, we can get a loop.

Jeff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help