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 2021/06/14 08:07:50 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request #3916: sched/posix_spawn: Don't insert name at the begin of argv

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


   ## Summary
   since the standard require the caller pass the name explicitly
   https://pubs.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html:
   The argument argv is an array of character pointers to null-terminated strings.
   The last member of this array shall be a null pointer and is not counted in argc.
   These strings constitute the argument list available to the new process image.
   The value in argv[0] should point to a filename that is associated with the
   process image being started by the posix_spawn() or posix_spawnp() function.
   
   ## Impact
   All caller of posix_spawn
   
   ## Testing
   
   


-- 
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] patacongo commented on pull request #3916: sched/posix_spawn: Don't insert name at the begin of argv

Posted by GitBox <gi...@apache.org>.
patacongo commented on pull request #3916:
URL: https://github.com/apache/incubator-nuttx/pull/3916#issuecomment-860996293


   > Yes, that's why I ask to modify task_xxx API too:(.
   
   @xiaoxiang781216 I think that the ugly insert_name boolean might be removed if we passed the arguments to nxtask_create() like:
   
   From posix_spawn():
   
       ret =  nxtask_init(tcb, argv[0], priority, stack stack_size_entry, &argv[1])
   
   and from task_spawn() like:
   
       ret =  nxtask_init(tcb, name, priority, stack stack_size_entry, argv)
   


-- 
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] patacongo merged pull request #3916: sched/posix_spawn: Don't insert name at the begin of argv

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


   


-- 
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] patacongo commented on pull request #3916: sched/posix_spawn: Don't insert name at the begin of argv

Posted by GitBox <gi...@apache.org>.
patacongo commented on pull request #3916:
URL: https://github.com/apache/incubator-nuttx/pull/3916#issuecomment-860763263


   > Yes, that's why I ask to modify task_xxx API too:(.
   
   That was not clear.
   
   I am not personally opposed to changing the APIs.  However, we need to be careful what we change that affects the NuttX user's code base.  We do need to try to keep the user facing interfaces stable from release to release.  Changing the task creation interface would impact all users and probably cause lots of negative feedback and bad feelings.
   
   Perhaps this is a discussion that should be discussed in a wider forum.  We should not make decisions that affect so many people in a discussion hidden deep in GIT issue comments.  My opinion about what is good for the NuttX users is not as important as actual user feedback.
   
   


-- 
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 commented on pull request #3916: sched/posix_spawn: Don't insert name at the begin of argv

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #3916:
URL: https://github.com/apache/incubator-nuttx/pull/3916#issuecomment-861177056


   Look like a good suggestion, I will provide a patch today.


-- 
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] patacongo edited a comment on pull request #3916: sched/posix_spawn: Don't insert name at the begin of argv

Posted by GitBox <gi...@apache.org>.
patacongo edited a comment on pull request #3916:
URL: https://github.com/apache/incubator-nuttx/pull/3916#issuecomment-860763263


   > Yes, that's why I ask to modify task_xxx API too:(.
   
   That was not clear.
   
   I am not personally opposed to changing the APIs.  However, we need to be careful what we change that affects the NuttX user's code base.  We do need to try to keep the user facing interfaces stable from release to release.  Changing the task creation interface would impact all users and probably cause lots of negative feedback and bad feelings.
   
   Perhaps this is a discussion that should be discussed in a wider forum.  We should not make decisions that affect so many people in a discussion hidden deep in GIT issue comments.  My opinion about what is good for the NuttX users is not as important as actual user feedback.
   
   On the other hand, my experience is that changing the user interface to make the code simpler usually results in bad user interfaces.
   


-- 
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 commented on pull request #3916: sched/posix_spawn: Don't insert name at the begin of argv

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #3916:
URL: https://github.com/apache/incubator-nuttx/pull/3916#issuecomment-860703074


   Yes, that's why I ask to modify task_xxx API too:(.


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