From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: proced: ppid of process ID 0 can be 0 Date: Sat, 20 Dec 2008 13:34:10 +0200 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1229772876 26803 80.91.229.12 (20 Dec 2008 11:34:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Dec 2008 11:34:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juanma Barranquero , Roland Winkler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 20 12:35:42 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 1LE07H-0007MQ-R0 for ged-emacs-devel@m.gmane.org; Sat, 20 Dec 2008 12:35:41 +0100 Original-Received: from localhost ([127.0.0.1]:58733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LE065-0002pO-40 for ged-emacs-devel@m.gmane.org; Sat, 20 Dec 2008 06:34:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LE060-0002nJ-9q for emacs-devel@gnu.org; Sat, 20 Dec 2008 06:34:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LE05y-0002lI-H0 for emacs-devel@gnu.org; Sat, 20 Dec 2008 06:34:11 -0500 Original-Received: from [199.232.76.173] (port=35337 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LE05x-0002l2-Ud for emacs-devel@gnu.org; Sat, 20 Dec 2008 06:34:10 -0500 Original-Received: from mtaout2.012.net.il ([84.95.2.4]:47832) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LE05w-0001LJ-LM for emacs-devel@gnu.org; Sat, 20 Dec 2008 06:34:09 -0500 Original-Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KC600H00AP0XZ00@i_mtaout2.012.net.il> for emacs-devel@gnu.org; Sat, 20 Dec 2008 13:36:35 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.252.83]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KC600DFDAWY52I0@i_mtaout2.012.net.il>; Sat, 20 Dec 2008 13:36:35 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 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:107115 Archived-At: > Date: Sat, 20 Dec 2008 03:52:40 +0100 > From: "Juanma Barranquero" > > proced.el assumes at several places (for example, at > `proced-filter-parents') that you can loop over the ppid, because > you'll eventually find a process with no parent. > > That's not true with on Windows, where ppid (0) == 0. That causes a > stack failure, for example, if you hit RET (`proced-refine') over the > PPID of process 0. > > I see two ways of fixing this: either removing the assumption from > proced.el, or forcing the Windows implementation of > system_process_attributes to adapt. First is more correct, second is > much easier (see tiny patch below). I'd prefer that proced.el doesn't make such an unportable assumption. Roland?