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/07/01 15:31:29 UTC

[GitHub] [incubator-nuttx-apps] hartmannathan commented on a change in pull request #791: Revert "Follow up task_spawn change from kernel side"

hartmannathan commented on a change in pull request #791:
URL: https://github.com/apache/incubator-nuttx-apps/pull/791#discussion_r662393172



##########
File path: system/popen/popen.c
##########
@@ -253,12 +253,8 @@ FILE *popen(FAR const char *command, FAR const char *mode)
   errcode = posix_spawn(&container->shell, argv[0], &file_actions,
                         &attr, argv, (FAR char * const *)NULL);
 #else
-  container->shell = task_spawn("popen", nsh_system, &file_actions,
-                                &attr, argv + 1, (FAR char * const *)NULL);
-  if (container->shell < 0)
-    {
-      errcode = -container->shell;
-    }
+  errcode = task_spawn(&container->shell, "popen", nsh_system, &file_actions,
+                       &attr, argv, (FAR char * const *)NULL);

Review comment:
       I don't understand why `argv + 1` is becoming `argv`. Not saying it's wrong, just mentioning it to make sure it isn't by mistake.




-- 
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-unsubscribe@nuttx.apache.org

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