incubator-nuttx/sched
Yoshinori Sugino bd79eaa5a6 sched/sched/sched_waitpid.c: Discard the correct child entry
Summary:
 - Discard the correct child entry after receiving SIGCHLD.

Impact:
 - waitpid, wait

Testing:
hifive1-revb:nsh (CONFIG_SCHED_HAVE_PARENT=y, CONFIG_SCHED_CHILD_STATUS=y, CONFIG_SIG_DEFAULT=y)
on QEMU

static int task_main(int argc, char *argv[])
{
  sleep(1);
  return 0;
}

int main(int argc, FAR char *argv[])
{
  pid_t pid1;
  pid_t pid2;
  int status;

  task_create("task1", 224, 1024, task_main, NULL);
  task_create("task2", 224, 1024, task_main, NULL);

  pid1 = waitpid(-1, &status, 0);
  pid2 = waitpid(-1, &status, 0);

  assert(pid1 != pid2);

  return 0;
}
2020-12-02 09:47:11 +09:00
..
clock Rename clock_systime[r|spec] to clock_systime_[ticks|timespec] 2020-05-10 14:35:50 -06:00
environ global change: repace sched_xfree() to kxmm_free() 2020-04-09 10:29:28 -06:00
group Modify SIGSTP to SIGTSTP 2020-10-29 01:12:43 -07:00
init sched/init: init the default home directory to environment 2020-11-09 23:42:46 -08:00
irq armv7-a: Fix comments on Cortex-A SGI 2020-11-19 18:01:30 -08:00
module sched/module/mod_modhandle.c: Fix a syslog format 2020-11-21 19:38:32 -08:00
mqueue sched/wdog: Remove MAX_WDOGPARMS and related stuff 2020-08-14 08:19:50 -06:00
paging Rename clock_systime[r|spec] to clock_systime_[ticks|timespec] 2020-05-10 14:35:50 -06:00
pthread sched/pthread/pthread_getaffinity.c: Fix a syslog format 2020-11-22 19:01:05 -08:00
sched sched/sched/sched_waitpid.c: Discard the correct child entry 2020-12-02 09:47:11 +09:00
semaphore sched/semaphore/sem_holder.c: Fix syslog formats 2020-11-22 19:01:05 -08:00
signal sched/signal: Remove redundant checks 2020-11-27 05:18:31 -06:00
task sched: Fix nx_waitid(), nx_waitpid(), nxtask_exithook() for SMP 2020-11-14 16:31:49 -08:00
timer sched/timer: add support of CLOCK_MONOTONIC 2020-11-09 15:01:36 -03:00
wdog sched/wdog: Remove MAX_WDOGPARMS and related stuff 2020-08-14 08:19:50 -06:00
wqueue sched/: Make more naming consistent 2020-05-16 13:39:03 -03:00
Kconfig signal.h: fix compile failed when open TTY_SIGINT 2020-11-05 08:28:53 +01:00
Makefile style/Makefile: remove unnecessary trailing whitespace 2020-11-28 12:20:30 +01:00