emacs-devel
[Top][All Lists]
Advanced

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

Remote process attributes


From: Michael Albinus
Subject: Remote process attributes
Date: Mon, 04 Apr 2022 12:59:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Hi,

Triggered by the recent changes in proced.el, I've played a little bit
in order to see whether proced could also show remote processes. After
all, it is really simple:

- list-system-processes and process-attributes shall return process
  information of the remote host when default-directory is remote. That
  is easy to achive by Tramp, calling ps on that remote host.

- proced would show a remote process list, if default-directory is remote.

That would work for the majority of remote default-directory kind. If
the related Tramp connection does not support remote processes, or there
is no proper argument list for ps, list-system-processes returns nil, no
problem.

This is an incompatible change for list-system-processes and
process-attributes. But the current behavior could be preserved by
calling sonething like

  (let ((default-directory temporary-file-directory))
    (list-system-processes))

There are not so many places list-system-processes and process-attributes
are used in core Emacs, GNU ELPA and NonGNU ELPA. All of them could be
adapted accordingly.

A problem could be to find the proper arguments for ps. I've used a
default setting for GNU/Linux, other systems could apply
connection-local variables for that. My proof-of-concept implementation
offers such settings for the Tramp adb method as well as for remote
(Free)BSD systems and ps implementations based on Busybox. That are the
test cases I could run locally.

Comments?

Best regards, Michael.



reply via email to

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