diff --git a/newlib/examples/mshell b/newlib/examples/mshell index 5d9d80cf..84ece8f5 100755 Binary files a/newlib/examples/mshell and b/newlib/examples/mshell differ diff --git a/newlib/examples/mshell.c b/newlib/examples/mshell.c index 3389c610..af4ee6fe 100644 --- a/newlib/examples/mshell.c +++ b/newlib/examples/mshell.c @@ -28,6 +28,7 @@ int main(int argc, char** argv) system("clear"); showlogo(); while(1) { + printf("$ "); size = scanf("%s", command); if(!strcmp(command, "exit")) { return 0; @@ -35,17 +36,16 @@ int main(int argc, char** argv) if(!strcmp(command, "help")) { help(); } else { - //pid = fork(); - //if (pid == 0) { //child + pid = fork(); + if (pid == 0) { //child char* newargv[] = {command, NULL}; char* newenv[] = {"USER=root", "PATH=/bin:/sbin:/usr/bin", "PWD=/", "TEMP=/tmp", NULL}; execve(command, newargv, newenv); return errno; - //} else { - // wait(&status); - // printf("Beendet"); - //} + } else { + wait(&status); + } } } return errno;