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: Juanma Barranquero
Subject: Re: proced: ppid of process ID 0 can be 0
Date: Sat, 20 Dec 2008 11:20:05 +0100

On Sat, Dec 20, 2008 at 04:27, Stefan Monnier <address@hidden> 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);




reply via email to

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