"quit" in shell panics

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Aug 31 07:36:39 UTC 2011


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).

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


-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list