Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.021 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:process': 0.07; 'subject:()': 0.09; 'received:74.125.82.174': 0.12; 'received :mail-wy0-f174.google.com': 0.12; 'am,': 0.14; 'wrote:': 0.14; 'forks': 0.16; 'terminated.': 0.16; 'intermediate': 0.16; 'header :In-Reply-To:1': 0.22; 'unlikely': 0.23; 'typically': 0.24; 'detect': 0.25; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'nobody': 0.29; 'sat,': 0.29; 'robust': 0.31; 'determine': 0.31; 'to:addr:python-list': 0.32; 'another': 0.32; "isn't": 0.34; 'there': 0.35; 'getting': 0.36; 'think': 0.36; 'problem.': 0.36; 'some': 0.37; 'subject:with': 0.37; 'apr': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'to:addr:python.org': 0.39; 'solution': 0.40; "it's": 0.40; 'header:Received:5': 0.40; '2011': 0.62; 'here.': 0.68; 'serious': 0.78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=aQ96ym8AW67jr6AzPXMGMDKD9Vap16YWSL1wRdACeTg=; b=Vcflw7xHG6ZhQhqC9FEJ5p2E8NnLM9a/Gw0VhNMQ+bzNVecg7nHWyOuV0m+Aj6hFua +5pC8aIJvSVbPJE1D1/mvYFrTsqFJK1wGlD2OS68rZboaQrq0BnT/NM7TGAJiMjLExEy bDVJ1mlaFVrjNIbiYPr3zm8XLLT8zCbecG0cE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=owaRXdkQr9K+xCKGQTAXZ+GUAvve54mjOMerwU7B6OfEf5mCtanM3aFS9iYU72wjUz 4bluMRSv1SxAv8nmSiIoUVampEPUdy46+/cjXQ36uAXRKUFYnp+JeTuv8X/lyUEdcNp5 mhp78BUG1oCj8YSCUwppB2gfDV8bjR4QntTXE= MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 9 Apr 2011 08:35:23 +1000 Subject: Re: How to get a PID of a child process from a process openden with Popen() From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 10 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1302302125 news.xs4all.nl 32470 [::ffff:82.94.164.166]:48043 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:2882 On Sat, Apr 9, 2011 at 5:28 AM, Nobody 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