You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/12/01 17:43:18 UTC

[GitHub] [incubator-nuttx] sgysh opened a new pull request #2455: sched/sched/sched_waitpid.c: Discard the correct child entry

sgysh opened a new pull request #2455:
URL: https://github.com/apache/incubator-nuttx/pull/2455


   ## 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;
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] masayuki2009 merged pull request #2455: sched/sched/sched_waitpid.c: Discard the correct child entry

Posted by GitBox <gi...@apache.org>.
masayuki2009 merged pull request #2455:
URL: https://github.com/apache/incubator-nuttx/pull/2455


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org