mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
New interface task_spawn(); exec_builtin() now uses task_spawn(); All argv types should be char * const * not const char **
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5598 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
NuttX TODO List (Last updated January 30, 2013)
|
||||
NuttX TODO List (Last updated February 2, 2013)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This file summarizes known NuttX bugs, limitations, inconsistencies with
|
||||
@@ -45,7 +45,7 @@ nuttx/
|
||||
apps/
|
||||
|
||||
(5) Network Utilities (apps/netutils/)
|
||||
(5) NuttShell (NSH) (apps/nshlib)
|
||||
(4) NuttShell (NSH) (apps/nshlib)
|
||||
(1) System libraries apps/system (apps/system)
|
||||
(5) Other Applications & Tests (apps/examples/)
|
||||
|
||||
@@ -2028,32 +2028,6 @@ o NuttShell (NSH) (apps/nshlib)
|
||||
Status: Open
|
||||
Priority: Low (enhancement)
|
||||
|
||||
Title: RE-DIRECTION OF BUILTIN APPLICATONS
|
||||
Description: There is a problem with the re-direction of output form built-in
|
||||
applications in NSH. When output is re-directed, exec_builtin()
|
||||
spawns a tiny trampoline task that re-directs the output as
|
||||
requested, starts the built-in task and then exit.
|
||||
|
||||
The problem is that when exec_builtin() starts the trampoline task,
|
||||
it receives and returns the pid of the trampoline task, and *not*
|
||||
the pid of the desired builtin application. This bad pid is returned
|
||||
to NSH and when NSH tries to use that pid in the waitpid() call, it
|
||||
fails because the trampoline task no longer exists.
|
||||
|
||||
The same tasking arrangement is used by the standard function
|
||||
posix_spawn(). However, posix_spawn uses the non-standard, internal
|
||||
NuttX interface task_reparent() to replace the childs parent task
|
||||
with the caller of posix_spawn().
|
||||
|
||||
exec_builtin() should not use this internal interface, however,
|
||||
since it resides in the application space. The suggested solution
|
||||
is (1) move the exec_builtin() logic into nuttx/sched, (2) make it
|
||||
a semi-standard interface renamed to task_spawn() and prototyped
|
||||
in nuttx/include/sched.h, and then (2) use task_reparent to solve
|
||||
the parental problem in the same way that posix_spawn does.
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
o System libraries apps/system (apps/system)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user