unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Remote process attributes
@ 2022-04-04 10:59 Michael Albinus
  2022-04-04 11:21 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Albinus @ 2022-04-04 10:59 UTC (permalink / raw)
  To: emacs-devel

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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-04-05 15:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-04 10:59 Remote process attributes Michael Albinus
2022-04-04 11:21 ` Eli Zaretskii
2022-04-04 11:33   ` Michael Albinus
2022-04-04 12:21     ` Eli Zaretskii
2022-04-04 12:27       ` Michael Albinus
2022-04-04 20:24         ` chad
2022-04-05 15:14           ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).