Unix Shell

Assignment

In this lab, you will create a user shell in the C programming language that can understand:

Programs that cannot be exec'd or terminate with errors (non-zero exit codes) should be reported.

Your lab must directly use the posix calls:

These system calls are documented in chapter 2 of the unix manual (e.g. $ man 2 fork).

In addition, your program should dynamically allocate memory using the library calls malloc and free. You may (if you like) use calloc and strdup which are part of the same library.

Please clearly indicate in your submission on which system your lab was tested (including architecture & os).

Useful Snippets

I wrote a few short programs to help you figure out how to use a few of the system calls. They're all in lab1Demos, and packed together in a single gzipped tarfile.

Grading

Our TA will assess: