Closed GoogleCodeExporter closed 9 years ago
The reason why ppid is cached is because the parent is not supposed to be
subject to change.
So I ask: how can you have a process whose parent is changing?
BTW, you can already skip the cached version and directly use:
p._platform_impl.get_process_ppid()
Original comment by g.rodola
on 30 Aug 2012 at 6:15
The parent can change: when you issue a kill on a process but some child
process won't exit. E.g. a bash script with some a chain of piped processes
and 1+ do not respond do not exit on a broken pipe. In this case, the process
gets attached to process 1 (init).
It happens, not doubt about it.
--
Accessing private methods isn't very clean.
Original comment by JeanLou....@gmail.com
on 30 Aug 2012 at 9:57
What platform(s) are we talking about?
Can you produce a link where this is discussed?
I've never heard of such a thing and couldn't find any reference about it.
That aside, checking for stuck processes this way sounds unreliable to me.
You might want to try Process.status or use Process.wait() right after you
killed/terminated the process of interest.
Original comment by g.rodola
on 30 Aug 2012 at 10:09
Linux.
See
http://stackoverflow.com/questions/356722/killing-a-defunct-process-on-unix-syst
em for more info.
"Wait" on a process that doesn't respond to kill is of no help.
Original comment by JeanLou....@gmail.com
on 30 Aug 2012 at 10:17
I'll be in US for a while, not sure when I'll be able to get back to this.
Original comment by g.rodola
on 31 Aug 2012 at 1:45
Fixed in revision 465f9dfca8c8.
The ppid is not only cached on Windows.
Original comment by g.rodola
on 10 Apr 2013 at 7:21
Original comment by g.rodola
on 11 Apr 2013 at 9:17
Original comment by g.rodola
on 11 Apr 2013 at 10:45
Original comment by g.rodola
on 12 Apr 2013 at 6:21
Original issue reported on code.google.com by
JeanLou....@gmail.com
on 30 Aug 2012 at 1:41