GUIDINGLI commented on pull request #4811:
URL: https://github.com/apache/incubator-nuttx/pull/4811#issuecomment-964761577


   In the struct task_group_s the tg_pid & tgppid is always exist, so the 
`cmd_ps` don't need to depends on CONFIG_SCHED_HAVE_PARENT.
   
   And the cmd_ps actually want show one thread belong to witch group, so 
`tg_pid` is enough.
   If you want to know the `tg_ppid`, you can cat /proc/xx/group/status to get 
the result.
   
   ```
   struct task_group_s
   {
   #if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_ARCH_ADDRENV)
     struct task_group_s *flink;       /* Supports a singly linked list         
   */
   #endif
     pid_t tg_pid;                     /* The ID of the task within the group   
   */
     pid_t tg_ppid;                    /* This is the ID of the parent thread   
   */
     uint8_t tg_flags;                 /* See GROUP_FLAG_* definitions          
   */
   }
   ```
   
   


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

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

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


Reply via email to