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: Wed, 24 Dec 2008 06:14:55 +0200

> From: Stefan Monnier <address@hidden>
> Cc: Eli Zaretskii <address@hidden>,  address@hidden,  address@hidden,  
> address@hidden
> Date: Tue, 23 Dec 2008 21:34:56 -0500
> 
> >>>> More to the point: even if we could distinguish the "no ppid" from
> >>>> "unkown ppid", it's unclear how Elisp code could make use of it.
> >>> Lisp code cannot, but a primitive written in C can.
> >> 
> >> Like what can it do?
> 
> > It can differentiate between FreeBSD 4.3 and FreeBSD 7.2 if they use a
> > different style of `process root', or between Linux 1.2.X, 2.4.X and
> > 2.6.X.  Right now, Emacs sets `system-type' to "berkeley-unix" on more
> > than one BSD system.  They might be easier to detect at C level.
> 
> That's not what I'm asking.  I'm asking: what can C code (or Elisp code
> for that matter) do when the ppid is somehow not found (i.e. there's no
> ppid available, but the process might have a parent).

The process-tree-root-p primitive does not need to employ the same
logic (nor even the same syscalls, actually) that
system-process-attributes does.  The latter simply omits from the
alist it returns any attribute that it could not fetch for some
reason, any reason.  The former could do something else.  What
exactly, I will figure out when I write it.




reply via email to

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