mirror of https://github.com/RT-Thread/rt-thread
[smart] fix of cmd_kill (#8071)
Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
parent
f6083af2cb
commit
b826afe8f9
|
@ -857,7 +857,7 @@ MSH_CMD_EXPORT(list_process, list process);
|
||||||
static void cmd_kill(int argc, char** argv)
|
static void cmd_kill(int argc, char** argv)
|
||||||
{
|
{
|
||||||
int pid;
|
int pid;
|
||||||
int sig = 0;
|
int sig = SIGKILL;
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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 */
|
/** must be able to be suspended */
|
||||||
RT_DEBUG_SCHEDULER_AVAILABLE(RT_TRUE);
|
RT_DEBUG_SCHEDULER_AVAILABLE(RT_TRUE);
|
||||||
|
|
||||||
if (!lwp || signo < 0 || signo >= _LWP_NSIG)
|
if (!lwp || signo <= 0 || signo > _LWP_NSIG)
|
||||||
{
|
{
|
||||||
ret = -RT_EINVAL;
|
ret = -RT_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue