chuj2
This commit is contained in:
parent
356589d214
commit
762f192b9f
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user