]> code.delx.au - gnu-emacs/commitdiff
* lisp/simple.el (process-menu-mode, list-processes--refresh):
authorTino Calancha <f92capac@gmail.com>
Tue, 7 Jun 2016 19:06:38 +0000 (15:06 -0400)
committerGlenn Morris <rgm@gnu.org>
Tue, 7 Jun 2016 19:06:38 +0000 (15:06 -0400)
Include PID.  (Bug#21725)

lisp/simple.el

index 3d25ec19ab26e616af67280f2690d2ed14168047..6c309293bd4a906c4fbff2ce613b5be985dea8b0 100644 (file)
@@ -3765,6 +3765,7 @@ support pty association, if PROGRAM is nil."
 (define-derived-mode process-menu-mode tabulated-list-mode "Process Menu"
   "Major mode for listing the processes called by Emacs."
   (setq tabulated-list-format [("Process" 15 t)
+                              ("PID"      7 t)
                               ("Status"   7 t)
                               ("Buffer"  15 t)
                               ("TTY"     12 t)
@@ -3796,6 +3797,7 @@ Also, delete any process that is exited or signaled."
               (process-query-on-exit-flag p))
           (let* ((buf (process-buffer p))
                  (type (process-type p))
+                 (pid  (if (process-id p) (format "%d" (process-id p)) "--"))
                  (name (process-name p))
                  (status (symbol-name (process-status p)))
                  (buf-label (if (buffer-live-p buf)
@@ -3831,7 +3833,7 @@ Also, delete any process that is exited or signaled."
                                         (format " at %s b/s" speed)
                                       "")))))
                     (mapconcat 'identity (process-command p) " "))))
-            (push (list p (vector name status buf-label tty cmd))
+            (push (list p (vector name pid status buf-label tty cmd))
                   tabulated-list-entries))))))
 
 (defun process-menu-visit-buffer (button)