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); printf("[%s]$ ", directory);
fgets(komenda, max, stdin); fgets(komenda, max, stdin);
ile = cut(argv, komenda); ile = cut(argv, komenda);
printf("\n%s\n\n", argv[0]);
if (argv[0]==NULL) if (argv[0]==NULL)
continue; continue;
else if (strcmp(argv[0], "exit") == 0) else if (!strncmp(argv[0], "exit", 4))
exit(0); break;
else else
if (fork() == 0) if (fork() == 0)
execvp(argv[0], argv); execvp(argv[0], argv);