emacs-devel
[Top][All Lists]
Advanced

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

Re: process-file instead of call-process in proced.el?


From: Eli Zaretskii
Subject: Re: process-file instead of call-process in proced.el?
Date: Fri, 25 Mar 2022 13:31:52 +0300

> From: Filipp Gunbin <fgunbin@fastmail.fm>
> Cc: emacs-devel@gnu.org,  winkler@gnu.org
> Date: Fri, 25 Mar 2022 13:24:10 +0300
> 
> On 25/03/2022 09:54 +0300, Eli Zaretskii wrote:
> 
> >> From: Filipp Gunbin <fgunbin@fastmail.fm>
> >> Date: Fri, 25 Mar 2022 03:09:12 +0300
> >> Cc: winkler@gnu.org
> >> 
> >> There's this TODO in proced.el:
> >> 
> >> --8<---------------cut here---------------start------------->8---
> >> ;; - Allow "sudo kill PID", "sudo renice PID"
> >> --8<---------------cut here---------------end--------------->8---
> >> 
> >> WDYT, can we just use process-file instead of call-process?  Then, if
> >> proced is opened from a /sudo:: (or su) buffer, and (setq
> >> proced-signal-function "kill") is set, proced-send-signal "just works"
> >> for processes owned by different user, with no special code in proced.
> >> 
> >> The simple patch is below.
> >
> > Thanks, but this should be at least conditioned on systems that have
> > these commands available.  MS-Windows, for example, has neither 'kill'
> > nor 'renice', and the equivalents of 'kill' that I know about don't
> > accept a signal ID as a command-line argument.
> 
> The patch only changes call-process to process-file, to support file
> handlers.  Setting "kill" into proced-signal-function is a user
> customization.

Sorry, from my POV fixing something means making it work as correctly
as we can reasonably do.  If it didn't work correctly before, we
should fix that as well, as part of any work on the relevant code.  I
understand that, if the doing TRT is complicated, it could be left to
a separate patch, but in this case it isn't complicated at all.

So let's fix this part of proced to work on all supported platforms,
okay?




reply via email to

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