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: Re: Remote process attributes Date: Mon, 04 Apr 2022 13:33:59 +0200 Message-ID: <87lewlccbc.fsf@gmx.de> References: <87pmlxcdx1.fsf@gmx.de> <837d85f61v.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37942"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 04 13:35: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 1nbKz8-0009ex-0S for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Apr 2022 13:35:02 +0200 Original-Received: from localhost ([::1]:42488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbKz6-0007Qm-QA for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Apr 2022 07:35:00 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbKyC-0006k8-KO for emacs-devel@gnu.org; Mon, 04 Apr 2022 07:34:06 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:40251) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbKyA-0005RE-1X; Mon, 04 Apr 2022 07:34:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1649072040; bh=q/9VZ1oFRTaQNCU/3yUoQcoJteMV/tWKoalGkPek9JQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Rau2fT5DK3NI6y19T+DctbPKvA20AZ7Db5vIRfOkCT0KTFYSvCFhtSXPf95rpjcXK Zlgh4jTWi77kdPnFswCK+W6cmpQ9zL2uqhbuCLJWCo52mmyFKksiasAuIfVR79OB1j beCFlrzR4aaypj1cSZZDRGpaAVGFplheFN5PWJ+k= 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 1MDhhN-1nkzKq3hu3-00Am2K; Mon, 04 Apr 2022 13:34:00 +0200 In-Reply-To: <837d85f61v.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 04 Apr 2022 14:21:00 +0300") X-Provags-ID: V03:K1:+coV8YU5hepkVbRIHDetprabeeC1vQ16pUianZjQFmm4dP3kqHq eHH1Px3I/gqV5JP7bw4bunHSh3zQ2ybIZFFR/kduGKS3wdzHvvqNTHxdiYm5BBbz/Z8UtgL xd20OCxZNVyaetacCzFZCA/Ls1dqVFZg94XXhBYd4oheSiQuC8uXn+9/A5jvo7FJHz+QywU jKVZTXVC3GL5/ZMVKKVWg== X-UI-Out-Filterresults: notjunk:1;V03:K0:kEGbE8aacBE=:jabFKSK9X2j0IFK9UpAs/F owwTe7NH7s+anM81WU4a5xxrBtWJ3AjGp2Lnv+BZFgIOGI03hIKAVN5PYBzERcge8kn44VOz+ 1wJpj4lM+5f+BGrVcaJUifmLQaVDLrM+hxo0soixUTT11JNOm0nqHTrHq4NLbMOAQJwEhIV5C g6WZEG1b/4tekwPiceYIBRpyCYnYsKJ1Tt0fzDift1S6n8r/cjuSIrVRG87GHXS6q1kS/waVK YFw4okh0ohmR0J6QoIXN9kJc5ItfP2HnhUpxz5WUZ+Mz4NE/+je170SfEVgDKKjTBWPfSV9eL Wtk7Kmn5nvc/EmLc1fZIc9qKEb0aas16r2q1IVELT/E5ny1MO/GZR0TqmsqDOV5JZ7QF22TU6 OVV0AyewvZVh43caYe7KwZ8odaypJS/g7Rm+u0Tx6WwaeICuK8jjKkQh5CRRF9rfiMma7InJc 5HEeW7oKNmV4yTYwcEq6J5rpiI4EYUX6REcraKc5dQTj3Gj62/maF5qZsCGsFKkaEnJ/1/irb gQ5ESWUCoR6pOwCrlB1s1dz87s5ow96yh7ZYdZWKzhJZtKgS1NzT+f4D4IYSe19w3i3wBaCu3 z0OoNFZUpjzxalJzMjeFZBLY02J2sEhi0op86QJQBpQTRuJUepc7vL/j63tqD6eWYrNJ4iRlu yR27ccO+hI4pYnmjmox1FQJ7Tu3RwquDVR0kgqHb8r5so8dJ7ul86kzdid+a9BGDIlE06L8Wa CPPHQcFHCLlXrWxoJoSUwX7RjDFAU3uRi+eMx7yDVgdf3VeufLZl1WNGpsn8KfjwqMs85FEk 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:287747 Archived-At: Eli Zaretskii writes: Hi Eli, >> - list-system-processes and process-attributes shall return process >> information of the remote host when default-directory is remote. > > Is it really certain that the default-directory being remote is > evidence significant enough that the user wants to list remote > processes? Processes aren't files, and aren't even related to files > like programs (whose executable files are looked up before we run > them). I've checked all occurences of list-system-processes and process-attributes in core Emacs, GNU ELPA and NonGNU ELPA. This is just a handful, and all of them could preserve their behavior with the template I've shown. Really not a big deal. If both functions are used somewhere else in the future, the documentation tells what to do. And I could imagine that this information about remote processes could be used not only in proced. >> 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. > > As mentioned in that thread, there are several ps implementations, and > they differ in what they accept and how they report various > attributes. We switched to our own implementation to avoid the > problems we had using ps. Now these problems will be back. I > envision trouble. I'm fully aware of this. And for local processes, nothing changes. For remote processes, my implementation simply returns nil if ps isn't called with a proper argument list. This could be enhanced case by case, and users could also configure the ps argument list by themselves, but for a large fraction of remote systems this would return already useful information. So it isn't a regression, but rather a progression. What we could think about is a way to indicate proced whether to return local or possibly remote process information. I wanted to add a prefix argument to proced in order to trigger remote process information, but this is already used for window selection. Best regards, Michael.