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/11/29 04:52:46 UTC

[GitHub] [incubator-nuttx] sgysh opened a new pull request #2437: sched/sched/sched_waitpid.c: Fix return value

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


   ## Summary
   
   waitpid should return the process ID of the child whose state has changed even if pid is -1.
   
   ## 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[])
   {
     return 0;
   }
   
   int main(int argc, FAR char *argv[])
   {
     pid_t tpid;
     pid_t wpid;
     int status;
   
     tpid = task_create("task", 100, 1024, task_main, NULL);
   
     sleep(1);
     wpid = waitpid(-1, &status, WNOHANG);
     printf("%d %d\n", tpid, wpid);
   
     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] xiaoxiang781216 merged pull request #2437: sched/sched/sched_waitpid.c: Fix return value

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


   


----------------------------------------------------------------
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