From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Remote process attributes Date: Mon, 04 Apr 2022 12:59:22 +0200 Message-ID: <87pmlxcdx1.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31540"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 04 13:01:02 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nbKSE-00082j-4j for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Apr 2022 13:01:02 +0200 Original-Received: from localhost ([::1]:52326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbKSC-0000cS-Vm for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Apr 2022 07:01:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbKQi-0008Jb-7v for emacs-devel@gnu.org; Mon, 04 Apr 2022 06:59:28 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:51403) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbKQg-0007NJ-9v for emacs-devel@gnu.org; Mon, 04 Apr 2022 06:59:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1649069964; bh=q+XWVzf5hTOhXctafFe/QOEf4RRk0xAa38wOZjRtxmU=; h=X-UI-Sender-Class:From:To:Subject:Date; b=BdghDZfCohSGRyOQdbKMf58PMGEDb5ye6lyZjbBBToqifcioNUnkIQIqOlNlj9Ab+ FutZYeAuUv9wUxn4qWv6CdMNH8Y3jV61ZwpjjpR0C41rJGoK6/pHbqgvKy4FHPs4oF UMjnfoUx44IGexJJJn+T35i0L5vRQ75oXxhYX720= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([79.140.118.138]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MRCOE-1nPApk1UG4-00NBh3 for ; Mon, 04 Apr 2022 12:59:24 +0200 X-Provags-ID: V03:K1:KQsw8+JXRj/6jhIQ1LX9HWYo6+b9TzuyUruEJqwDepl9jji0OXy IBsIjnBahuQcEOUYiipBzm3RjjdkxYhGSXBeI4IQYbJR6RiZOJwnrtT6ieGYYibc7EnFlmO XfqOFMOPvJT94X7wbRf3pD6dp00Xj56BVSU4J9RXe6cQoJbq963IARKfrSM2K4VaW2Agom6 8yh4o2rnU9F1myp8jpXGQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:xFzfqIf6iv0=:uTMzNH20xR95zxp/BkOHPD Jznrj7ZeT6bfNdx93hy0SZ1hACBBVOzZn+XCMAPuhH781kW2Z6/9EFyKBBMyunjTTPd43C5JA v2OtoEI+WJIIVqMIcriWWQ7h4GSJseOM/6jKh5Fa5Qszjoqwcut/NKS1iCNTKqfMrN802LmWJ NBauM1kwszt9iavQBgqNffdfe3EKkWDRodPK20tTaVqsa5sE5JdOheQC3zg99B85cj0v4+Y0F F/yTong9vYNDggQJMUTM92s05uwCKqy9UvxpnHyXHyBo5rFKVpj7DSrWPSGJUHvlzFoUxM0tR Wl0JadndsRmY2lepPge9ULDUycOvBf+8oyUkrDNqxacbzvHjVp+ze8eCShlOCLB+Wn5SXqVoA DUQaaEkwa+SvUx9EhQF1Ui3F1FBAnFWVoSHN/dnSqLKXlTB3VvNGn3baC01hHsNsjkv5An+UH h+bTj24a30XMtVj1fYs0gp1TIq0kaf8U6F+0FuzsCTEzOeV8PDYrSL8PsDxPdcGaz3kRhJ1Eh HQ5bih2+cv33BU7M3LvnJQluZpLPkzXs40NIlSylYewO2qoBFGYMUxzARpHnihvbgKfgYQISh elSsjlDJFpo32+FEztn5x28SmLPGLQMF71Z2HfKf8D/YXsaiLjWbGtfuVos02DIhX4n3PQ7VV n0VgdUbzaZmgLNJA6Eu8k5TZP+RyUAnWN5eTFgnPcIIP6OcsqUWB860/gKCUkKc0J6ajWhHSR SsQrBwyNUsn47bJultjD+DzYRI6kvI6b9Z06JMZZApqbmHJUzV+M0NFQ/injIMBneZr6pnZh Received-SPF: pass client-ip=212.227.15.18; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:287745 Archived-At: 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.