Call posix_spawn with filename as the first argv entry

pair with the kernel side change to follow the standard defintion:
https://pubs.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2021-06-13 14:10:24 +08:00
committed by patacongo
parent 21562e8960
commit 99e1674912
5 changed files with 22 additions and 24 deletions

View File

@@ -126,7 +126,7 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
* failure.
*/
ret = posix_spawnp(&pid, cmd, &file_actions, &attr, &argv[1], NULL);
ret = posix_spawnp(&pid, cmd, &file_actions, &attr, argv, NULL);
if (ret == OK)
{
/* The application was successfully started with pre-emption disabled.