GUIDINGLI commented on code in PR #2737:
URL: https://github.com/apache/nuttx-apps/pull/2737#discussion_r1801239463


##########
nshlib/nsh_parse.c:
##########
@@ -279,6 +279,7 @@ static const char g_arg_separator[]   = "`$";
 static const char g_redirect_out1[]   = ">";
 static const char g_redirect_out2[]  = ">>";
 static const char g_redirect_in1[]   = "<";
+static const char g_pipeline1[]       = "|";

Review Comment:
   why add 1 ?
   g_pipeline



##########
nshlib/nsh_parse.c:
##########
@@ -1060,9 +1080,9 @@ static FAR char *nsh_cmdparm(FAR struct nsh_vtbl_s *vtbl, 
FAR char *cmdline,
 
   /* Create a unique file name using the task ID */
 
-  tmpfile = NULL;
-  ret = asprintf(&tmpfile, "%s/TMP%d.dat", CONFIG_LIBC_TMPDIR, getpid());
-  if (ret < 0 || !tmpfile)
+  ret = asprintf(&param_exec.file_out, "%s/TMP%d.dat",

Review Comment:
   compile fail at 1126,
   should free param_exec.file_out



##########
nshlib/nsh_parse.c:
##########
@@ -2592,16 +2619,27 @@ static int nsh_parse_command(FAR struct nsh_vtbl_s 
*vtbl, FAR char *cmdline)
   FAR char *argv[MAX_ARGV_ENTRIES];
   FAR char *saveptr;
   FAR char *cmd;
-  FAR char *redirfile_out = NULL;
-  FAR char *redirfile_in = NULL;
-  int       oflags = 0;
+  struct nsh_exec_param_s param_exec = {
+      .fd_in      = -1,
+      .fd_out     = -1,
+      .oflags_in  = 0,
+      .oflags_out = 0,
+      .file_in    = NULL,
+      .file_out   = NULL
+  };
+
+  int  pipefd[2] = {

Review Comment:
   remove extra space



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