summaryrefslogtreecommitdiff
path: root/nuttx/sched/sig_kill.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-12 19:58:45 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-12 19:58:45 +0000
commit499c8c86de6757b39eaaf0f2b96a5b070f085b9b (patch)
tree84c6da5c61268158365bdafe58f546b34a0b8a91 /nuttx/sched/sig_kill.c
parent5a180ec4940c993311eedddaa13194f9977968f1 (diff)
downloadpx4-nuttx-499c8c86de6757b39eaaf0f2b96a5b070f085b9b.tar.gz
px4-nuttx-499c8c86de6757b39eaaf0f2b96a5b070f085b9b.tar.bz2
px4-nuttx-499c8c86de6757b39eaaf0f2b96a5b070f085b9b.zip
Fix a *critical* bug in the task exit logic. Implements SIGCHILD
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5513 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/sig_kill.c')
-rw-r--r--nuttx/sched/sig_kill.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nuttx/sched/sig_kill.c b/nuttx/sched/sig_kill.c
index 17921015f..b3d74d8a1 100644
--- a/nuttx/sched/sig_kill.c
+++ b/nuttx/sched/sig_kill.c
@@ -84,6 +84,9 @@
int kill(pid_t pid, int signo)
{
+#ifdef CONFIG_SCHED_HAVE_PARENT
+ FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head;
+#endif
FAR _TCB *stcb;
siginfo_t info;
int ret = ERROR;
@@ -124,6 +127,10 @@ int kill(pid_t pid, int signo)
info.si_signo = signo;
info.si_code = SI_USER;
info.si_value.sival_ptr = NULL;
+#ifdef CONFIG_SCHED_HAVE_PARENT
+ info.si_pid = rtcb->pid;
+ info.si_status = OK;
+#endif
/* Send the signal */