Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
Mit dem (erfolgreichen) Aufruf von exec ist dein Programm beendet, nur das Neue existiert noch.The exec family of functions replaces the current process image with a new process image
for (;;){
pid = fork();
if (pid == 0){
printf("$ ");
gets(input);
strcpy(input2, input);
command = strtok(input, "-");
option = strstr(input2, "-");
params[0] = command;
params[1] = option;
params[2] = NULL;
execvp(params[0], params);
exit(0);
}
}
for (;;) {
pid = fork();
if (pid == 0){
printf("$ ");
gets(input);
strcpy(input2, input);
command = strtok(input, " -");
option = strstr(input2, "-");
params[0] = command;
params[1] = option;
params[2] = NULL;
printf("Option: \"%s\"\n",option);
execvp(params[0], params);
} else {
wait(0);
}
}
for (;;) {
printf("$ ");
gets(input);
if(!strcmp(input, "exit"))
exit(0);
pid = fork();
if (pid == 0){
strcpy(input2, input);
command = strtok(input, " -");
option = strstr(input2, "-");
params[0] = command;
params[1] = option;
params[2] = NULL;
printf("Option: \"%s\"\n",option);
execvp(params[0], params);
} else {
wait(0);
}
}