xiaoxiang781216 commented on a change in pull request #185: nsh improvement
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/185#discussion_r410680852
 
 

 ##########
 File path: nshlib/nsh.h
 ##########
 @@ -1008,10 +1008,15 @@ int cmd_irqinfo(FAR struct nsh_vtbl_s *vtbl, int argc, 
char **argv);
   int cmd_readlink(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
 #endif
 #if CONFIG_NFILE_STREAMS > 0 && !defined(CONFIG_NSH_DISABLESCRIPT)
-#  ifndef CONFIG_NSH_DISABLE_SH
+#if !defined(CONFIG_NSH_DISABLE_SH) && defined(CONFIG_SYSTEM_SYSTEM)
 
 Review comment:
   Yes, the old sh modify the parent environment directly which don't complain 
with all other POSIX  variant implementation. That is why I made this change.
   @davids5 the old sh behaviour can achieve with the new command "source" I 
add in the same patch.
   1.The new 'source' command like the old 'sh' execute the script in the 
current nsh task
   2.The new 'sh' implementation execute the script in the new task like other 
POSIX OS.
   3./etc/init.d/rcS and /etc/.nshrc still run inside the current nsh task like 
before.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to