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: Sun, 21 Dec 2008 00:02:56 +0200 Message-ID: References: <18765.19040.568030.246241@tfkp04.physik.uni-erlangen.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1229810700 2209 80.91.229.12 (20 Dec 2008 22:05:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Dec 2008 22:05:00 +0000 (UTC) Cc: lekktu@gmail.com, emacs-devel@gnu.org To: Roland Winkler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 20 23:05:59 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 1LE9wr-0007Yn-TS for ged-emacs-devel@m.gmane.org; Sat, 20 Dec 2008 23:05:54 +0100 Original-Received: from localhost ([127.0.0.1]:54828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LE9ve-0005Rl-JM for ged-emacs-devel@m.gmane.org; Sat, 20 Dec 2008 17:04:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LE9uS-00052u-F9 for emacs-devel@gnu.org; Sat, 20 Dec 2008 17:02:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LE9uR-00052K-0q for emacs-devel@gnu.org; Sat, 20 Dec 2008 17:02:55 -0500 Original-Received: from [199.232.76.173] (port=34482 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LE9uQ-00052E-A8 for emacs-devel@gnu.org; Sat, 20 Dec 2008 17:02:54 -0500 Original-Received: from mtaout5.012.net.il ([84.95.2.13]:12463) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LE9uP-0000O1-K9 for emacs-devel@gnu.org; Sat, 20 Dec 2008 17:02:53 -0500 Original-Received: from conversion-daemon.i_mtaout5.012.net.il by i_mtaout5.012.net.il (HyperSendmail v2004.12) id <0KC700K003LSPX00@i_mtaout5.012.net.il> for emacs-devel@gnu.org; Sun, 21 Dec 2008 00:04:57 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.252.83]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KC7007BW407HS70@i_mtaout5.012.net.il>; Sun, 21 Dec 2008 00:04:56 +0200 (IST) In-reply-to: <18765.19040.568030.246241@tfkp04.physik.uni-erlangen.de> 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:107141 Archived-At: > Date: Sat, 20 Dec 2008 20:41:20 +0100 > From: "Roland Winkler" > Cc: Juanma Barranquero , emacs-devel@gnu.org > > > I'd prefer that proced.el doesn't make such an unportable assumption. > > I am not sure I get the point here. What is unportable where? The assumption that going up the process tree will eventually find a process that has no ppid attribute. > I mean, it seems to me that ultimately the solution is always the > same: when using the ppid attribute, one needs to make sure that it > is different from the corresponding pid. Or could one assign a > special meaning to the case that ppid=pid? There is no doubt that > proced assumes that ppid is always different from pid. Why do you need to assume that? Is that only to determine whether a given process is the root of the process tree? If so, a more portable way of doing that would be to have a primitive for that with a system-dependent implementation. If you need that assumption for something else, let's hear those other reasons. > Yet anybody using system-process-attributes elsewhere might be > surprised that the return value of system-process-attributes can > give such meaningless results It is no more meaningless than having a process with no parent, IMO.