I was hoping for some advice from someone more knowledgeable than myself. I'm messing around and trying to learn how to write a shell. So far, I've successfully used flex to parse input and properly put it into a char**. Then I fork() and run execvp() in the child process and wait() in the parent process. Works fine, except that when I run one command it works, but when I run another, it doesn't. What gives?
>echo itworks
itworks
>ls
>echo itworks
>wtf
>^C
Any advice would be appreciated. I don't understand why this would happen. ps doesn't list and child processes, either.
Name:
Anonymous2009-09-19 23:05
Here's the body of the loop. One may assume that all variables and functions used are defined, of course.