unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: emacs-devel@gnu.org
Subject: Remote process attributes
Date: Mon, 04 Apr 2022 12:59:22 +0200	[thread overview]
Message-ID: <87pmlxcdx1.fsf@gmx.de> (raw)

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	other threads:[~2022-04-04 10:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 10:59 Michael Albinus [this message]
2022-04-04 11:21 ` Remote process attributes 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmlxcdx1.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).