mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
system: adb: fix shell service
Fix wrong dup2 return value check after:
fs: file_dup2 shouldn't hold the file list lock
1e5bfa623aa93b918566e8dc0e2f9c1a1037f45e
Fix issue in adb shell introduced in:
nsh: Pass the correct command lines to nsh_consolemain
6aca60133c
This commit is contained in:
parent
998abe1deb
commit
e4db4df673
1 changed files with 5 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* system/adb/shell_pipe.c
|
||||
* apps/system/adb/shell_pipe.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
|
@ -187,7 +187,7 @@ int shell_pipe_exec(char * const argv[], shell_pipe_t *apipe,
|
|||
/* Setup stdout (read: adb, write: child) */
|
||||
|
||||
ret = dup2(out_fds[1], 1);
|
||||
assert(ret == 0);
|
||||
assert(ret == 1);
|
||||
|
||||
ret = close(out_fds[1]);
|
||||
assert(ret == 0);
|
||||
|
|
@ -229,8 +229,9 @@ int shell_pipe_exec(char * const argv[], shell_pipe_t *apipe,
|
|||
/* Create shell process */
|
||||
|
||||
ret = task_create("ADB shell", CONFIG_SYSTEM_NSH_PRIORITY,
|
||||
CONFIG_SYSTEM_NSH_STACKSIZE, nsh_consolemain,
|
||||
&argv[1]);
|
||||
CONFIG_SYSTEM_NSH_STACKSIZE,
|
||||
argv ? nsh_system : nsh_consolemain,
|
||||
argv);
|
||||
|
||||
/* Close stdin and stdout */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue