opt: make spawn and spawn_shell log to debug log

This commit is contained in:
DreamMaoMao 2026-02-26 23:22:51 +08:00
parent 3642fafe49
commit 3c5ab60e6a

View file

@ -849,7 +849,7 @@ int32_t spawn_shell(const Arg *arg) {
execlp("bash", "bash", "-c", arg->v, (char *)NULL);
// if execlp fails, we should not reach here
wlr_log(WLR_ERROR,
wlr_log(WLR_DEBUG,
"mango: failed to execute command '%s' with shell: %s\n",
arg->v, strerror(errno));
_exit(EXIT_FAILURE);
@ -890,7 +890,7 @@ int32_t spawn(const Arg *arg) {
execvp(argv[0], argv);
// 4. execvp 失败时:打印错误并直接退出(避免 coredump
wlr_log(WLR_ERROR, "mango: execvp '%s' failed: %s\n", argv[0],
wlr_log(WLR_DEBUG, "mango: execvp '%s' failed: %s\n", argv[0],
strerror(errno));
_exit(EXIT_FAILURE); // 使用 _exit 避免缓冲区刷新等操作
}