How mayank24343/os_assignment2_group_60 works
SimpleShell is a small interactive Unix shell. The main workflow reads a command, records it, dispatches it for built-in or external execution, waits for completion, and retains process timing for display. Its principal execution branches are single commands and pipelines; history display and SIGINT cleanup are supporting capabilities. The runtime is implemented in one source file, so several components share its path.
Main entry points: shell.c Command dispatcher
Components 15
Shell interaction
- Shell loop
shell.c - Command launcher
shell.c - SIGINT handler
shell.c
Command execution
- Command dispatcher
shell.c - Argument parser
shell.c - Directory change
shell.c - History command
shell.c - Single process
shell.c - Pipeline execution
shell.c
History and tracking
- History array
shell.c - History display
shell.c - Process display
shell.c - History cleanup
shell.c
Other components
- User
- Unix commands
Connections 20
- User → Shell loop: enters commands
README.md - Shell loop → Command launcher: launches command
shell.c - Command launcher → Command dispatcher: calls
shell.c - Command dispatcher → Argument parser: parses arguments
shell.c - Command dispatcher → Directory change: handles cd
shell.c - Command dispatcher → History command: handles history
shell.c - Command dispatcher → Single process: forks command
shell.c - Command dispatcher → Pipeline execution: runs pipeline
shell.c - Single process → Unix commands: executes via execvp
shell.c - Pipeline execution → Unix commands: executes via execvp
shell.c - Shell loop → History array: records command
shell.c - Command dispatcher → History array: records process data
shell.c - History command → History display: calls
shell.c - History display → History array: reads entries
shell.c - Shell loop → Process display: displays on exit
shell.c - Process display → History array: reads process data
shell.c - SIGINT handler → Process display: displays details
shell.c - SIGINT handler → History cleanup: calls
shell.c - Shell loop → History cleanup: cleans on return
shell.c - History cleanup → History array: frees PID data
shell.c