1722 words 7 pages
CISC 7310
Operating Systems
Fall 2013
Dayton Clark cissh project
Due December 4th

ID (4-digit):
In this project we implement a simple shell called, cissh. I have implemented the some of the shell, you are to complete the implementation of two features.
As is cissh can execute commands like “ls” cissh-| ls
==== ls
TAGS cissh cissh.c cissh.o cissh.output cisshSingleCommand.c cisshDescription.odt cisshSingleCommand.o cisshPipe.c discussion.tpl cisshPipe.o solution.output cisshRedirectedInput.csysCallManPages.pdf cisshRedirectedInput.otestScript.txt cisshRedirectedOutput.c cisshRedirectedOutput.o

and “ls > filelist” cissh-| ls > fileList
==== ls
…show more content…

When you type just only return key in the cissh, tokenCount is Zero. So *tokens[tokenCount1] is *tokens[-1].
[sun compiler problem]
If you compile these files by the sun c compiler (cc), the compiler does not have -Wall option. So you have to change cc to gcc or -Wall to -v in Makefile.

What is to be done?
To implement these features you will need (at least) two system calls, dup(2) and pipe(2). You also need to download the cissh distribution file from BlackBoard. This is a zip file.
Copy it to your account on the Sun systems in the Web building and unzip it. I believe that “unzip” will do it. Enter the cissh directory and type make. This will compile cissh and run it on testScript.txt. You will notice that the redirected input and pipe features do not work.
There are four files that will be of most interest to you. These are cisshSingleCommand.c, cisshRedirectedOutput.c, cisshRedirectedInput.c, and cisshPipe.c. The first two implement the corresponding features. The latter two print error messages. These two are where you will implement the corresponding features.
The files cisshSingleCommand.c and cisshRedirectedOutput.c are well commented and should you a good idea of what you need to do to implement the other two features.

You are to submit a file containing four items:

this file, cissh.doc, (with your discussion below);

C files you modified,