Re: [PATCH v3] cpupower: monitor: Exit with error status if execvp() fail

From: Yiwei Lin
Date: Thu Feb 20 2025 - 12:52:38 EST



On 2/21/2025 1:37 AM, Shuah Khan wrote:
On 2/20/25 09:38, Yiwei Lin wrote:
In the case that we give a invalid command to idle_monitor for
monitoring, the execvp() will fail and thus go to the next line.
As a result, we'll see two differnt monitoring output. For
example, running `cpupower monitor -i 5 invalidcmd` which `invalidcmd`
is not executable.

---

Note that everything below this gets thrown away.

V3:
- Modify output message content

V2:
- Check return value from execvp and print message for invalid command
---

These version information goes after the --- below the Signed-off-by

Note that everything below the


Signed-off-by: Yiwei Lin <s921975628@xxxxxxxxx>
---

This where the patch version stuff goes. I fixed this for now.

Thank you to help for the fix! I'll be careful with the commit message next time. I'm sorry if you experienced any inconvenience with this.

All the best,

Yiwei Lin