Computer Science 322
Operating Systems

Mount Holyoke College
Spring 2008


Lab 5: The Lyon Shell
Due: 10:00 AM, Friday, April 4, 2008


After a few weeks of small labs while being distracted by an exam and spring break, it's back to a bigger programming task.

For this lab, you are to write a C program called the Lyon Shell (lysh), a mini command shell interpreter. lysh is similar to familiar Unix shells such as the Bourne shell (sh) the Bourne-Again shell (bash), and C shell (csh, tcsh). You will learn about process creation, pipes, input/output redirection, background process management, signals, and interrupt handling, and gain extensive experience with C.

You may work in groups of size 2 or 3. Collaboration within a group is, of course, unrestricted. You may discuss the program with members of other groups, but what you turn in must be your own group's work. Groups must be formed no later than 10:00 AM, Friday, March 28, 2008, and be confirmed by all group members by electronic mail to jteresco@mtholyoke.edu. All group members will be assigned the same grade for the lab. There are many subtasks that can be carved off and assigned to group members, so everyone is encouraged to join a group.

Requirements

Like the Unix shells you use every day, lysh should issue a prompt (below, it is "xyzsh#"), at which it reads commands from the user and executes them.

Your shell should interpret the following commands and provide the following functionality:

Notes

Submission and Evaluation

All necessary files should be submitted using turnin as lab5. Include a Makefile to allow easy compilation of the Lyon Shell program.

I will compile and test your shell programs on cluster FreeBSD systems.

Your program will be graded based on a total of 50 points.

Penalties may be applied for poor design choices, poor formatting of code, poor programming style, or if your program compiles with warnings (when using gcc -Wall).

Have fun and good luck!