Omar Khan ohk2
Murali Kumar mk262


EXECUTION INSTRUCTIONS

UNIX:

      %make
      %ourshell

WINDOWS:

Double click on shell.vcproj 
Compile it under VS. NET. 
Then run the executable created.

REQUIRED FEATURES

The listed features are working unless otherwise specified.

      1) prompt contains working directory  
      2) specify commands by relative pathname
      3) specify commands by absolute pathname
      4) support > and < 
      5) support jobs
      6) support cd
      7) support history 
      8) support !-x
      9) support !x
      10) support kill x
      11) support exit


NOTES

For keeping track of background jobs we used different methods for each operating system. For Linux, we had our parent process catch SIGCHLD signals and remove the jobs from the background list accordingly. Since we did this and were modifying shared structures in our code (in the childHandler and when adding a job to the background list) we used a mutual exclusion principle to access the data structure. Namely, when anyone other than the childhandler wanted to change the list, it blocked the SIGCHLD signal and unblocked when done.

On Windows, after each entered command we simply cycled through all background jobs and checked if they were done. This is much easier but not as elegant as the UNIX solution.



ANNOTATED BIBLIOGRAPHY

      sources consulted
        We consulted the GNU C library and took the childHandler code mostly from that library. We also read about the signal function and how best to share data when using signals and took ideas from their suggestions. The specific link is:

	http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_21.html
   

For Windows, we made extensive use of the online MSDN library. We did not take any code specifically, but rather learned from their examples and definitions. For redirecting stdin adn stdout, we were inspired by the details on the following page:

	http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/startupinfo_str.asp
