September 18, 2007

Handling CTRL-D in project 1

There has been some confusion over how to handle CTRL-D in interactive mode. In general, you should try to rely on the string input functions (e.g., fgets()) to do most of the work. However, here are some cases you should handle. In the example below, “$” is the prompt, and means you het enter.

Case 1:
$ command
$

You should execute the command and then exit the shell

Case 2:

$ command more stuff

The should be ignored.

Case 3:

$ command

You should execute command and then exit the shell

- Mike

September 05, 2007

Project 1: Process control in the Unix Shell

The first project is available at http://pages.cs.wisc.edu/~cs537-2/Projects/P1/project1.html .

In this project, you will be asked to implement a subset of the Unix shell functionality yourself.

Use the comment feature of this blog to post questions or share test code. In addition, I will post answers to questions emailed directly to course instructors.