Re: Builtin app with its own command processor on stdin

2024-01-24 Thread spudaneco
iltin app with its own command processor on stdin Hi Alan,I have meant my app is processing its own commands as long as the quitcommand is entered or CTRL-C is pressed.BR,JernejOn Tue, Jan 23, 2024 at 9:15 PM Alan C. Assis wrote:> Hi Jernej,> by not returning to NSH do you mean after pres

Re: Builtin app with its own command processor on stdin

2024-01-23 Thread Jernej Turnsek
Hi Alan, I have meant my app is processing its own commands as long as the quit command is entered or CTRL-C is pressed. BR, Jernej On Tue, Jan 23, 2024 at 9:15 PM Alan C. Assis wrote: > Hi Jernej, > by not returning to NSH do you mean after pressing Ctrl+C ? > > Maybe this tutorial will help:

Re: Builtin app with its own command processor on stdin

2024-01-23 Thread Alan C. Assis
Hi Jernej, by not returning to NSH do you mean after pressing Ctrl+C ? Maybe this tutorial will help: https://www.youtube.com/watch?v=hszt15lTsnA BR, Alan On Tue, Jan 23, 2024 at 4:56 PM Jernej Turnsek wrote: > I am running an app in the foreground. I didn't have waitpid enabled. Now I > have

Re: Builtin app with its own command processor on stdin

2024-01-23 Thread Jernej Turnsek
I am running an app in the foreground. I didn't have waitpid enabled. Now I have and it works as it should. BTW, my app is not exiting to nsh. Thanks. On Tue, Jan 23, 2024 at 7:38 PM Gregory Nutt wrote: > Are you running app in foreground or background from NSH, i.e., > > nsh> app > nsh> app & >

Re: Builtin app with its own command processor on stdin

2024-01-23 Thread Gregory Nutt
Are you running app in foreground or background from NSH, i.e., nsh> app nsh> app & The second should show this kind of interleaved behavior.  In the first, nsh should block until the app exits. Do you have waitpid() enabled?  The first behavior depends on the availability of waitpid() Doe

Re: Builtin app with its own command processor on stdin

2024-01-23 Thread Jernej Turnsek
Never mind. I have found a solution in the Nuttx Shell documentation, where the CONFIG_SCHED_WAITPID option is described to force synchronous builtin app execution, instead of asynchronous. On Tue, Jan 23, 2024 at 6:19 PM Jernej Turnsek wrote: > Hi, > I would like to develop my own builtin appli

Builtin app with its own command processor on stdin

2024-01-23 Thread Jernej Turnsek
Hi, I would like to develop my own builtin application to process some custom commands. This app is started from nsh over the serial console. I have duplicated the code from ftpc example and when application is started it start to process stdin for commands. But this functionality is mixed with nsh