mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-09 08:21:27 -04:00
opt: make spawn and spawn_shell log to debug log
This commit is contained in:
parent
43114bbf8d
commit
835269f86b
1 changed files with 2 additions and 2 deletions
|
|
@ -848,7 +848,7 @@ int32_t spawn_shell(const Arg *arg) {
|
||||||
execlp("bash", "bash", "-c", arg->v, (char *)NULL);
|
execlp("bash", "bash", "-c", arg->v, (char *)NULL);
|
||||||
|
|
||||||
// if execlp fails, we should not reach here
|
// 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",
|
"mango: failed to execute command '%s' with shell: %s\n",
|
||||||
arg->v, strerror(errno));
|
arg->v, strerror(errno));
|
||||||
_exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
|
|
@ -889,7 +889,7 @@ int32_t spawn(const Arg *arg) {
|
||||||
execvp(argv[0], argv);
|
execvp(argv[0], argv);
|
||||||
|
|
||||||
// 4. execvp 失败时:打印错误并直接退出(避免 coredump)
|
// 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));
|
strerror(errno));
|
||||||
_exit(EXIT_FAILURE); // 使用 _exit 避免缓冲区刷新等操作
|
_exit(EXIT_FAILURE); // 使用 _exit 避免缓冲区刷新等操作
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue