Linux Shell (C)
Oct 2024
CConcurrencyData Structures
a custom shell written in C with command execution, piping, redirection, and signal handling. the focus is on process control and getting correctness right under typical shell behaviors.
recursive pipe chaining supports arbitrary-depth pipelines via right-to-left parsing and fork/dup2
5 built-ins (cd, source, prev, help, verbose) communicate with parent via a dedicated global IPC pipe
single-pass tokenizer handles quoted strings, special characters, and whitespace with a custom 2x-growth dynamic vector
what i built
- command execution with piping and I/O redirection
- signal handling and process orchestration
- built-in commands (source, prev, cd, help, verbose toggle)
how it works
- 1parse input into commands and pipeline segments
- 2fork/exec child processes and wire pipes between them
- 3apply redirections and handle signals
- 4track history for built-ins like prev
what's next
- add job control (fg/bg) if i feel like it
- harden parsing for edge cases and quoting rules