On Mon, 29 Apr 2019 at 17:02, Johnson, Andrew N. via Tech-talk <
[email protected]> wrote:
We might be able to add a routine to iocsh that replicates the VxWorks shellScriptAbort() routine; calling that aborts the current VxWorks target shell and stops reading the startup script. I haven't studied how it works on VxWorks, but my guess is that on
entry the shell calls setjmp(), and the abort routine calls longjmp() to return to that context again and clean up. I could see that as a possible cause of lost resources if we're not careful though.
Sounds dangerous...
I would rather have a new API for the shell commands (allowing return codes) and a glue layer for the existing (old API) commands that returns 0 in the new API.
~Ralph