From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Re: proced: ppid of process ID 0 can be 0 Date: Sat, 20 Dec 2008 11:20:05 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229768467 16140 80.91.229.12 (20 Dec 2008 10:21:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Dec 2008 10:21:07 +0000 (UTC) Cc: Emacs Devel To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 20 11:22:14 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LDyyL-0005iu-EH for ged-emacs-devel@m.gmane.org; Sat, 20 Dec 2008 11:22:13 +0100 Original-Received: from localhost ([127.0.0.1]:36673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDyx8-0004My-V6 for ged-emacs-devel@m.gmane.org; Sat, 20 Dec 2008 05:20:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LDywL-00042m-8U for emacs-devel@gnu.org; Sat, 20 Dec 2008 05:20:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LDywJ-00041P-8l for emacs-devel@gnu.org; Sat, 20 Dec 2008 05:20:08 -0500 Original-Received: from [199.232.76.173] (port=43718 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDywI-000414-Cn for emacs-devel@gnu.org; Sat, 20 Dec 2008 05:20:06 -0500 Original-Received: from yx-out-1718.google.com ([74.125.44.152]:22264) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LDywI-00006W-3R for emacs-devel@gnu.org; Sat, 20 Dec 2008 05:20:06 -0500 Original-Received: by yx-out-1718.google.com with SMTP id 34so505276yxf.66 for ; Sat, 20 Dec 2008 02:20:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ZhWX3VZehH+XiqKkszXbzQgkJM4BHrRilrML4B2O9rs=; b=vI1NTWoTnNk5k+eOwXhRLF2En8zOaQHxCZF2F0gZFiFE9p3jkQJk1MiBTReWOQNnaN WNgiQO+pLIfS3aT14loxbY3ADzdgER0Yf4aRakgZmSIta/T/PRJraRlMV8TMfi2xx6AP sIxFMzc0y74hzwdogOt/U0URg03pTuHOjjH7w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=FJxLd6Npe63gMaf2o1Dve4oZU3v9j/ZYR7Dvw5g6BFGuOt0tm7wwvuhA/FvH1xEV99 2NK1pYSt8fYcqG7eJybqsqogQRfSepBaUbKfBjFl38bwN0lZ5GMUGYu3SXe+Jr9IYnis WQKffmCdguMH6IqKuRWHsHFxsDq0qY3pijDHM= Original-Received: by 10.100.143.14 with SMTP id q14mr2809274and.47.1229768405184; Sat, 20 Dec 2008 02:20:05 -0800 (PST) Original-Received: by 10.100.13.13 with HTTP; Sat, 20 Dec 2008 02:20:05 -0800 (PST) In-Reply-To: Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107107 Archived-At: On Sat, Dec 20, 2008 at 04:27, Stefan Monnier wrote: > Better test "proc_id != proc_id", I think. You mean to test proc_id != parent_id, like in the patch below? That's OK too, although I don't think a process other than 0 can have itself as parent. Juanma Index: src/w32.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/w32.c,v retrieving revision 1.157 diff -u -2 -r1.157 w32.c --- src/w32.c 19 Dec 2008 19:50:39 -0000 1.157 +++ src/w32.c 20 Dec 2008 10:14:08 -0000 @@ -3886,7 +3886,8 @@ } attrs = Fcons (Fcons (Qcomm, decoded_cmd), attrs); - attrs = Fcons (Fcons (Qppid, - make_fixnum_or_float (pe.th32ParentProcessID)), - attrs); + if (proc_id != pe.th32ParentProcessID) + attrs = Fcons (Fcons (Qppid, + make_fixnum_or_float (pe.th32ParentProcessID)), + attrs); attrs = Fcons (Fcons (Qpri, make_number (pe.pcPriClassBase)), attrs);