FAQ for Project 1
This list of frequently asked questions for project 1 will be updated as questions arrive.
- In a typed command, must an ampersand (&) be preceded by a space?
A space before the ampersand is optional. Your shell should accept commands with or without a space preceding the ampersand. That is, the following two commands are equivalent:
- What should happen if the user gives an improper number of arguments to an internal command?
The shell should print an appropriate error message and ignore the command.
The command wait and exit should have no arguments,
while the cd command should have exactly one argument.
- What should happen if the user types exit when there are still
background commands running?
The shell should wait for the background commands to complete
before it exits, naturally!
- My program seems to compile with the g++ compiler, but not with the gcc compiler.
What's going on?
g++ is the compiler for C++ programs, while gcc is the compiler
for C programs. You should be using only gcc, as your program is to be
written in C, not C++. If you are getting errors with gcc, it means
that your program contains some elements of C++ that must be removed or converted
into ordinary C.