"quit" in shell panics

Joel Sherrill joel.sherrill at OARcorp.com
Thu Sep 1 12:37:04 UTC 2011


On 08/31/2011 02:36 AM, Sebastian Huber wrote:
> Hello,
>
> the problem is that "bye" and "exit" are special cases in the shell to exit the
> loop.  There is also an "exit" command, which calls
> rtems_fatal_error_occurred().  This command does not execute due to the special
> case handling in the shell.  Only its alias "quit" can be reached.
>
> I think we should remove the shell command "exit" and all its alias.  The
> "shutdown N" command can be used to invoke exit(N).
>
As I recall, the original intention of "exit" was to logout of
the current instance of the shell.  That is what it does on
any other POSIX-ish system.  If you want to shut down the
system, use "shutdown" or "halt".

--joel
> On 03/03/2010 05:44 PM, Peter Dufault wrote:
>> Observe:
>>
>> RTEMS SHELL (Ver.1.0-FRC):/dev/console. Mar  2 2010. 'help' to list commands.
>> [/] # exit
>> Shell exiting
>>
>> RTEMS SHELL (Ver.1.0-FRC):/dev/console. Mar  2 2010. 'help' to list commands.
>> [/] # bye
>> Shell exiting
>>
>> RTEMS SHELL (Ver.1.0-FRC):/dev/console. Mar  2 2010. 'help' to list commands.
>> [/] # quit
>> rtems-4.9.99.0(PowerPC/Generic (E500/float-gprs/SPE)/mpc5566evb) PANIC ERROR 0
>>
>> Obviously (I think) the shell is calling exit(0) (This is especially annoying when I did it remotely via telnet).
>> There's a place where shell.c handles "bye" and "exit" specially, and I'm going to add "quit" in the same manner.  I don't see where that "quit" alias is added, though.  I don't have much time to go over the code right now, is there a way to get at the underlying command string so that aliases to exit are always handled cleanly without special code?
>>
>> Peter
>> -----------------
>> Peter Dufault
>> HD Associates, Inc.      Software and System Engineering
>>
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-users
>


-- 
Joel Sherrill, Ph.D.             Director of Research&  Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985




More information about the users mailing list