Skip to content
Permalink
Browse files

Add command exit to builtin_command(char **argv)

  • Loading branch information
heapsmash committed Oct 9, 2019
1 parent bb3d924 commit 36314a11a7ce1af0d54bb76b12c42bf0eb228dc5
Showing with 5 additions and 0 deletions.
  1. +5 −0 tsh.c
5 tsh.c
@@ -274,6 +274,11 @@ int parseline(const char *cmdline, char **argv)

int builtin_cmd(char **argv)
{
if (!strcmp(argv[0], "quit")) /* quit command */
exit(0);
if (!strcmp(argv[0], "&")) /* ignore singleton & */
return 1;

return 0; /* not a builtin command */
}

0 comments on commit 36314a1

Please sign in to comment.
You can’t perform that action at this time.