From 77cadb117dcf2fc7114f2a17a0ec2051d82eb0a2 Mon Sep 17 00:00:00 2001 From: shaojinchun Date: Sat, 12 Jun 2021 09:49:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3msh=5Fexec=E4=B8=AD=E5=AF=B9?= =?UTF-8?q?=5Fmsh=5Fexec=5Flwp=E7=9A=84=E8=BF=94=E5=9B=9E=E5=80=BC?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/finsh/msh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/finsh/msh.c b/components/finsh/msh.c index 4e3323a821..34b7b955bd 100644 --- a/components/finsh/msh.c +++ b/components/finsh/msh.c @@ -544,9 +544,10 @@ int msh_exec(char *cmd, rt_size_t length) #ifdef RT_USING_LWP #ifdef RT_USING_GDBSERVER /* exec from msh_exec , debug = 0*/ - if (_msh_exec_lwp(0, cmd, length) == 0) + /* _msh_exec_lwp return is pid , <= 0 means failed */ + if (_msh_exec_lwp(0, cmd, length) > 0) #else - if (_msh_exec_lwp(cmd, length) == 0) + if (_msh_exec_lwp(cmd, length) > 0) #endif { return 0; -- Gitee