summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey V.Kosteltsev <AKosteltsev@IBS.RU>2022-09-24 21:44:57 +0300
committerAndrey V.Kosteltsev <AKosteltsev@IBS.RU>2022-09-24 21:44:57 +0300
commit12d643b8421cfec714881fae1698777bb9a55207 (patch)
treef5f4c58f8fdcd76a36bbf4187412faf6a8ec0c20
parent4d4bd1f1c468a0c580ec2c2bff0dbd9b00fd106d (diff)
downloadsila-shell-12d643b8421cfec714881fae1698777bb9a55207.tar.xz
Ctrl-D for all users
-rw-r--r--src/main.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index f6172b4..8ab3853 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;
}
/*