Lab 5 - Shell Lab: Writing your own Unix shell

Additional test trace (trace16.txt) for Lab 5:  

The teaching staff has noticed that some of you are incorrectly calling delete_job from your sigint_handler and sigtstp_handler routines. This is incorrect because it assumes that SIGINT and SIGTSTP signals come only from typing ctrl-c and ctrl-z, when in fact they can come from anywhere. Instead, you should delete jobs in your sigchld_handler routine, when the shell reaps a terminated child.

This error isn't detected in the original 15 test traces we gave you, so we are providing you with another test trace (trace16.txt) to help you verify your code. The trace runs two little test programs called myint.c and mystop.c that send SIGINT and SIGTSTP signals to themselves. Your shell will need to pass this test to be considered correct.

Here's how to run the new test:

1. Copy all 6 files from


    to your working directory for Lab 5, overwriting the existing Makefile, README, and tshref.out files, and creating new myint.c, mystop.c, and trace16.txt files.

2. In your working directory for L5, type "make" to compile the new files.

3. Use "make test16" and "make rtest16" to compare your shell with the reference shell. Make any necessary fixes to your tsh.c file and resubmit your program if necessary.

Lab 5 due date extended to Sunday Nov 3 at 11:59pm

Last modified: Fri Nov 1 20:11:20 EST 2002