Skip to content
Commit 4d364d83 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

This commit adds nsh_consolechild(). I noticed that there are several...

This commit adds nsh_consolechild().  I noticed that there are several examples that call nsh_consolemain.c to create to create a new NSH session.  That will not always work because nsh_consolemain() performs the one-time initialization needed by the NSH library:  Mounting, reading, and running the start-up script, configuring USB tracing.  Some of those actions will cause failures if attempted twice.

Here are some offenders: examples/cc3000/shell.c, examples/nsh/nsh_main.c, examples/nxterm/nxterm_main.c, and examples/pty_test/pty_test.c.  It is possible that for some of those, that represents the first call to nsh_consolemain().  But probably not.

To give other initialization options, I added nsh_consolechild() which is identical to nsh_consolemain() other than it omits all of the one-time initialization.  Of course, you would not get the result that you wanted if nsh_consolechild() were called without nsh_consolemain().
parent 775d25c5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment