How to get a PID of a child process from a process openden with Popen()

Chris Angelico rosuav at gmail.com
Sat Apr 9 00:35:23 CEST 2011


On Sat, Apr 9, 2011 at 5:28 AM, Nobody <nobody at nowhere.com> wrote:
> There isn't a robust solution to the OP's problem. It's typically
> impossible to determine whether one process is an ancestor of another if
> any of the intermediate processes have terminated.

Upstart and gdb can both detect forks and follow the child. But I
think that's getting into some serious esoteria that's unlikely to be
of much practical use here.

Chris Angelico



More information about the Python-list mailing list