Sunday, August 23, 2009
Writing a new shell
So I started writing my own shell called 'vish'. Lots of issues. The 'execve' system call does not seem to work consistently. I tried to track down the problem and what I found is this: I have a pointer to an array of strings which represent the command arguments that the user types in. I am using strtok to parse user input and build this structure. But as soon as I call fork(), this data structure is getting corrupted in both the parent and child processes. This just does not make any sense. Will get back and take a closer look.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment