"quit" in shell panics

Peter Dufault dufault at hda.com
Wed Mar 3 16:44:07 UTC 2010


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




More information about the users mailing list