Add NSH kill command

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3322 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-02-27 17:26:06 +00:00
parent 2586abc3b4
commit 2bd446832b
6 changed files with 208 additions and 90 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
/************************************************************************
* sched/sig_kill.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -96,7 +96,7 @@ int kill(pid_t pid, int signo)
if (pid <= 0)
{
*get_errno_ptr() = ENOSYS;
errno = ENOSYS;
return ERROR;
}
@@ -104,7 +104,7 @@ int kill(pid_t pid, int signo)
if (!GOOD_SIGNO(signo))
{
*get_errno_ptr() = EINVAL;
errno = EINVAL;
return ERROR;
}
@@ -118,7 +118,7 @@ int kill(pid_t pid, int signo)
sdbg("TCB=0x%08x signo=%d\n", stcb, signo);
if (!stcb)
{
*get_errno_ptr() = ESRCH;
errno = ESRCH;
sched_unlock();
return ERROR;
}