fork
This commit is contained in:
parent
7ae5848374
commit
d742f3f1f3
@ -48,8 +48,14 @@ int main (){
|
||||
else if (!strcmp(argv[0], "exit"))
|
||||
break;
|
||||
else
|
||||
if (fork() == 0)
|
||||
if (fork() == 0){
|
||||
ptintf("/n");
|
||||
execvp(argv[0], argv);
|
||||
}
|
||||
else{
|
||||
wait(NULL);
|
||||
printf("koniec komendy");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user