[smart] fix of cmd_kill (#8071)

Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
Shell 2023-09-22 15:06:07 +08:00 committed by GitHub
parent f6083af2cb
commit b826afe8f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -857,7 +857,7 @@ MSH_CMD_EXPORT(list_process, list process);
static void cmd_kill(int argc, char** argv)
{
int pid;
int sig = 0;
int sig = SIGKILL;
if (argc < 2)
{

View File

@ -690,7 +690,7 @@ rt_err_t lwp_signal_kill(struct rt_lwp *lwp, long signo, long code, long value)
/** must be able to be suspended */
RT_DEBUG_SCHEDULER_AVAILABLE(RT_TRUE);
if (!lwp || signo < 0 || signo >= _LWP_NSIG)
if (!lwp || signo <= 0 || signo > _LWP_NSIG)
{
ret = -RT_EINVAL;
}