mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-01 01:40:19 -05:00
opt: make spawn and spawn_shell log to debug log
This commit is contained in:
parent
3642fafe49
commit
3c5ab60e6a
1 changed files with 2 additions and 2 deletions
|
|
@ -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 避免缓冲区刷新等操作
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue