Guys....

I am writing a shell .I've managed to get the input from the user through a string and then I've tokenised it.
Now the problem is do i need to know weather its a programme or should i continue to fork it without knowing it.
As all of u might know when we enter something in a shell and if its not valid we get an error message. This is what i am stuck at. Do I need to know if the user input is a valid programme before fork and if yes then I need some urgent help on how should I do that.
thanx.

Just do the fork/exec. If the exec fails, print the appropriate error message.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.