mikeizbicki / ucr-cs100

open source software construction course
Other
485 stars 407 forks source link

HW3 execvpe #1629

Closed hkwan003 closed 9 years ago

hkwan003 commented 9 years ago

Just to confirm. we are not suppose to use execvp for hw3. we need to use exevpe like you mentioned in class right?

mikeizbicki commented 9 years ago

Incorrect. I made the assignment easier. The old version of the assignment required you to use execv instead of execvp. In this version, you are still allowed to use execvp.

hkwan003 commented 9 years ago

If I did execvpe already, can I keep it or do I need to change it to execvp?

mikeizbicki commented 9 years ago

You are allowed to use any version of exec that you'd like. So execvpe is fine.

ZhuLeon commented 9 years ago

Do we need exec at all? I thought since it didn't recognize cd and we don't need cd to work with other stuff from previous assignments, we wouldn't need exec at all, at least for the part you'll be grading

mikeizbicki commented 9 years ago

There is no need to modify any of the code related to exec. You can't just remove that code though. The specifications require you to be able to launch programs so that when you type ^C they quit but your shell doesn't. If you don't use exec, then you won't have any programs to test ^C with.