Force applet_name to be "sh" when command prefaced by "-"

This commit is contained in:
Eric Andersen 2001-03-20 17:39:53 +00:00
parent 7ef1a5beb2
commit ba372620c2
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ int main(int argc, char **argv)
/* Add in a special case hack -- whenever **argv == '-' /* Add in a special case hack -- whenever **argv == '-'
* (i.e. '-su' or '-sh') always invoke the shell */ * (i.e. '-su' or '-sh') always invoke the shell */
if (**argv == '-' && *(*argv+1)!= '-') { if (**argv == '-' && *(*argv+1)!= '-') {
exit(((*(shell_main)) (argc, argv))); applet_name = "sh";
} }
#endif #endif

View File

@ -93,7 +93,7 @@ int main(int argc, char **argv)
/* Add in a special case hack -- whenever **argv == '-' /* Add in a special case hack -- whenever **argv == '-'
* (i.e. '-su' or '-sh') always invoke the shell */ * (i.e. '-su' or '-sh') always invoke the shell */
if (**argv == '-' && *(*argv+1)!= '-') { if (**argv == '-' && *(*argv+1)!= '-') {
exit(((*(shell_main)) (argc, argv))); applet_name = "sh";
} }
#endif #endif