mikeizbicki / ucr-cs100

open source software construction course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HW2 Weird Bug

jbarb011 opened this issue · comments

I've been working on HW2 piping for the regrade and I've ran into a really annoying bug. Sometimes when you try to run a normal command like ls or cat with input and output redirection, execvp claims it can't find the command you entered. execvp works just fine without redirection.
The thing is, the bugs only appear on hammer and seemingly disappear when I run my shell off of hammer. I've ran it with gdb and it says that the error occurs when I run execvp but when I printed out the contents of argv I couldn't find anything wrong with it. I'm beginning to suspect it might be an external problem from my code, but I can't say for certain.
I'm not really sure what to do at this point. Thoughts?

I've never had a student report a bug like this before. I also don't see how a bug like this would be caused. So I'm not sure how to help.

My only suggestion is that maybe you're misinterpretting the error and debug messages that you're seeing.