This commit is contained in:
Jakub Adamski 2019-01-10 14:57:55 +01:00
parent 356589d214
commit 762f192b9f

View File

@ -47,11 +47,10 @@ int main (){
printf("[%s]$ ", directory);
fgets(komenda, max, stdin);
ile = cut(argv, komenda);
printf("\n%s\n\n", argv[0]);
if (argv[0]==NULL)
continue;
else if (strcmp(argv[0], "exit") == 0)
exit(0);
else if (!strncmp(argv[0], "exit", 4))
break;
else
if (fork() == 0)
execvp(argv[0], argv);