This commit is contained in:
Jakub Adamski 2019-01-10 13:59:45 +01:00
parent 1c84005dc8
commit 0b875d62fc
1 changed files with 3 additions and 2 deletions

View File

@ -43,8 +43,9 @@ int main (){
printf("[%s]$ ", directory); printf("[%s]$ ", directory);
fgets(komenda, max, stdin); fgets(komenda, max, stdin);
cut(argv, komenda); cut(argv, komenda);
if (argv[0]==NULL)
if (!strcmp(argv[0], "exit")) continue;
else if (!strcmp(argv[0], "exit"))
break; break;
else else
execvp(argv[0], argv); execvp(argv[0], argv);