diff --git a/nshlib/nsh_fileapps.c b/nshlib/nsh_fileapps.c index 7e3f94e0d..98c50dffa 100644 --- a/nshlib/nsh_fileapps.c +++ b/nshlib/nsh_fileapps.c @@ -30,6 +30,7 @@ #endif #include +#include #include #include #include @@ -126,7 +127,7 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, * failure. */ - ret = posix_spawnp(&pid, cmd, &file_actions, &attr, argv, NULL); + ret = posix_spawnp(&pid, cmd, &file_actions, &attr, argv, environ); if (ret == OK) { /* The application was successfully started with pre-emption disabled.