[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: |
Wed, 31 Mar 2021 16:19:19 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> * Stefan Monnier <monnier@iro.umontreal.ca> [2021-03-31 17:24]:
>> > (let* ((sudo `(call-process "sudo" nil ,sudo-buffer t "su" "-c" "--"
>> > "root" "-c" ,command))
>> > (status (eval sudo))
>>
>> Why? No kitten needs to suffer here:
>>
>> (let* ((status (call-process "sudo" nil sudo-buffer t "su" "-c" "--"
>> "root" "-c" command))
>
> In that specific case yes. It works, I changed it. But it defeats
> itself in purpose, do you see? That COMMAND is parameter to `su' which
> invokes default user's shell. I don't find it bad, it just defeats the
> purpose of `call-process'.
You still have the risk of "command" being incorrect because of
messed up quoting, but not because of the shell you yourself invoke: just
because of the shell invoked by `su`. And since "command" is what you
receive you can't do much better than that anyway.
Stefan
- Re: Finding simpler better sudo for Emacs, (continued)
Re: Control of fan-speed on Lenovo Thinkpads, Stefan Monnier, 2021/03/30
- Re: Control of fan-speed on Lenovo Thinkpads, Jean Louis, 2021/03/30
- Re: Control of fan-speed on Lenovo Thinkpads, Stefan Monnier, 2021/03/30
- Re: Control of fan-speed on Lenovo Thinkpads, Jean Louis, 2021/03/31
- Re: Control of fan-speed on Lenovo Thinkpads, Stefan Monnier, 2021/03/31
- Re: Control of fan-speed on Lenovo Thinkpads, Jean Louis, 2021/03/31
- Re: Control of fan-speed on Lenovo Thinkpads,
Stefan Monnier <=
Re: Control of fan-speed on Lenovo Thinkpads, Utkarsh Singh, 2021/03/31