emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proced: ppid of process ID 0 can be 0


From: Eli Zaretskii
Subject: Re: proced: ppid of process ID 0 can be 0
Date: Sun, 21 Dec 2008 00:02:56 +0200

> Date: Sat, 20 Dec 2008 20:41:20 +0100
> From: "Roland Winkler" <address@hidden>
> Cc: Juanma Barranquero <address@hidden>, address@hidden
> 
> > 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]