How kamalmarhubi/shell-workshop works
This repository is a small Unix-shell workshop implementation. The user enters a line; the shell parses it into commands, connects pipeline stages with file descriptors, forks children to execute programs, and waits for them. The README describes builtins such as cd, but the sampled implementation does not show builtin handling. The graph reflects the sampled source and documented workflow; it does not infer other shell features.
Main entry points: shell.c Shell loop · utils.c Pipeline parser
Components 9
Shell interaction
- Prompt input
shell.c - Shell loop
shell.c - Pipeline parser
utils.c - Command parser
utils.c
Command execution
- Pipe setup
shell.c - Child launcher
shell.c - Redirect and exec
shell.c
Other components
- User
- OS process services
Connections 10
- User → Prompt input: enters commands
README.md - Prompt input → Shell loop: returns input
shell.c - Shell loop → Pipeline parser: parses pipeline
shell.c - Pipeline parser → Command parser: parses stages
utils.c - Shell loop → Pipe setup: connects stages
shell.c - Shell loop → Child launcher: launches commands
shell.c - Child launcher → Redirect and exec: executes in child
shell.c - Shell loop → OS process services: forks and waits
shell.c - Pipe setup → OS process services: creates pipes
shell.c - Redirect and exec → OS process services: redirects and execs
shell.c