Function: proced-process-attributes
proced-process-attributes is a byte-compiled function defined in
proced.el.gz.
Signature
(proced-process-attributes &optional PID-LIST)
Documentation
Return alist of attributes for each system process.
This alist can be customized via proced-custom-attributes.
Optional arg PID-LIST is a list of PIDs of system process that are analyzed.
If no attributes are known for a process (possibly because it already died)
the process is ignored.
Source Code
;; Defined in /usr/src/emacs/lisp/proced.el.gz
;; generate listing
(defun proced-process-attributes (&optional pid-list)
"Return alist of attributes for each system process.
This alist can be customized via `proced-custom-attributes'.
Optional arg PID-LIST is a list of PIDs of system process that are analyzed.
If no attributes are known for a process (possibly because it already died)
the process is ignored."
;; Should we make it customizable whether processes with empty attribute
;; lists are ignored? When would such processes be of interest?
(let (process-alist attributes attr)
(dolist (pid (or pid-list (list-system-processes)) process-alist)
(when (setq attributes (process-attributes pid))
(setq attributes (cons (cons 'pid pid) attributes))
(dolist (fun proced-custom-attributes)
(if (setq attr (funcall fun attributes))
(push attr attributes)))
(push (cons pid attributes) process-alist)))))