diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-12 19:58:45 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-12 19:58:45 +0000 |
commit | b58281cab8add0af82167282126132b069170dd6 (patch) | |
tree | 84c6da5c61268158365bdafe58f546b34a0b8a91 /nuttx/sched/sig_kill.c | |
parent | db161f73bc2608dbb8ad8c022609198f7f0b3f95 (diff) | |
download | px4-firmware-b58281cab8add0af82167282126132b069170dd6.tar.gz px4-firmware-b58281cab8add0af82167282126132b069170dd6.tar.bz2 px4-firmware-b58281cab8add0af82167282126132b069170dd6.zip |
Fix a *critical* bug in the task exit logic. Implements SIGCHILD
git-svn-id: http://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.c | 7 |
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 */ |