Skip to content

obadaalagha/CS570_A2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Obada Alagha cssc2115 819 852 274 <-- Turned in on this class account. Same student on blackboard.
Amiel Nava   cssc2124 824 264 864
CS 570 Summer 2020
Assignment #2, msh microshell
Filename: README

FILE MANIFEST: Makefile, header.h, main.c, processes.c, shell.c, README

COMPILE INSTRUCTIONS:
"make" to compile.
"make clean" to remove the executable and any other generated files. This will allow smooth recompilation with make.

OPERATING INSTRUCTIONS: After running the program, type in the name or path of the file you'd like to run. You may also pipe multiple files within the command line. Typing in "exit" will exit the program. Typing in "debug" will provide some print statements for debugging purposes, but not add any additional functionality to the program.

DESIGN DECISIONS:
We decided to split the program into 3 .c files and one header file. The 3 .c files, main.c, shell.c, and processes.c each handled a different part of the program. main.c simply launched the program and called the begin_shell function in shell.c. Correspondingly, shell.c handles all parts of the program associated with running the shell, managing user input, and ensuring graceful voluntary exit. It then passes on the parsed input to processes.c, which handles launching of the executable files or chaining the multiple executables to ensure a proper pipe, alongside any ungraceful exits. The header.h file is where we stored all of our included libraries, function prototypes, constants, and structures. An if-not-defined statement is included to ensure that nothing is added in to the compilation and pre-processing process more than once.

EXTRA FEATURES: Followed good practice in .c, .h, and makefile files.

KNOWN BUGS: None.

LESSONS LEARNED:
We learned how to, essentially, make a basic command line/shell. We were able to use system functions such as execvp, fork, and pipefd to properly launch (any number) applications and ensure a safe launch as well. Furthermore, my Amiel and I used git within this assignment. While I had previous experience with git, nonetheless I learned a few new things about it and Amiel was able to pick up an entirely new skill, unrelated to the material of this class specifically.

About

CS 570 Assignment 2 - msh microshell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published