help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Control of fan-speed on Lenovo Thinkpads


From: Stefan Monnier
Subject: Re: Control of fan-speed on Lenovo Thinkpads
Date: Tue, 30 Mar 2021 21:23:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> You probably mean process-file? There is no file-process.

Indeed, sorry.

> There is practical burden to use call-process, and it is with &rest
> ARGS, as those have to be given all separately.

There is no such extra burden.  Arguments always have to be given
separately.  If you forget about that, you get bugs and associated
security holes.  Executing a process is not the same as executing an
`shell` command.  The first is a fairly simple and safe operation
(assuming you trust the executable you're launching), whereas the second
is tricky and risky unless you're extra careful to quote everything just
right and you're sure the shell is really the one you expect, etc...

And if you really indeed get a shell command as input instead of an
executable along with its list of arguments, then it's trivial to turn
from `command` to `&rest args` by simply doing (list shell-file-name
shell-command-switch command).


        Stefan




reply via email to

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