diff options
author | Andrey V.Kosteltsev <AKosteltsev@IBS.RU> | 2022-09-24 21:44:57 +0300 |
---|---|---|
committer | Andrey V.Kosteltsev <AKosteltsev@IBS.RU> | 2022-09-24 21:44:57 +0300 |
commit | 12d643b8421cfec714881fae1698777bb9a55207 (patch) | |
tree | f5f4c58f8fdcd76a36bbf4187412faf6a8ec0c20 | |
parent | 4d4bd1f1c468a0c580ec2c2bff0dbd9b00fd106d (diff) | |
download | sila-shell-12d643b8421cfec714881fae1698777bb9a55207.tar.xz |
Ctrl-D for all users
-rw-r--r-- | src/main.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -25,7 +25,6 @@ char pwd[PATH_MAX], home[PATH_MAX]; static sigset_t blockmask; -int can_quit = 0; COMMAND top_admin_list[] = { { "help", com_help, "Display this text" }, @@ -41,6 +40,7 @@ COMMAND top_operator_list[] = { { "?", com_help, "Synonym for `help'" }, { "shell", com_shell, "Activate submenu shell" }, { "users", com_users, "Activate submenu users" }, + { "quit", com_quit, "Quit using SILA Shell" }, { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL } }; @@ -48,6 +48,7 @@ COMMAND top_user_list[] = { { "help", com_help, "Display this text" }, { "?", com_help, "Synonym for `help'" }, { "shell", com_shell, "Activate submenu shell" }, + { "quit", com_quit, "Quit using SILA Shell" }, { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL } }; @@ -69,7 +70,6 @@ COMMAND shell_admin_list[] = { { "more", com_more, "View the contents of FILE" }, { "vi", com_vi, "Edit the contents of text FILE" }, { "..", com_top, "Return to top menu" }, - { "quit", com_quit, "Quit using SILA Shell" }, { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL } }; @@ -391,10 +391,7 @@ int main( int argc, char **argv ) if( !line ) { - if( !can_quit ) - continue; /* for non-priviledged users */ - else - break; /* for admin */ + break; } /* |