Executor-oriented logic flow (Design by workani)
Minishell is built around a recursive execution tree that cleanly separates parsing from execution. This architecture enables unlimited pipe depth while keeping process control predictable and robust.
- Lexing and Parsing: User input is tokenized and transformed into an Abstract Syntax Tree (AST).
- Tree Traversal: The execution engine walks the AST, resolving pipes, redirections, and built-in commands.
- Process Orchestration: Processes are forked, signals are configured, and I/O is redirected before handing control to
execve.
- External commands via
PATHusingexecve. - Built-ins executed in-process when required.
- Correct exit status propagation (
$?).
- Unlimited pipe depth using an AST-based executor.
- Proper file descriptor management.
- Built-ins and external commands mixed safely.
<,>,>>,<<(heredoc with delimiter handling).- Redirections resolved per AST node.
- Single
'and double"quotes with Bash-like behavior. $VARand$?expansion.- Correct expansion order.
ctrl-Cresets prompt.ctrl-Dexits.ctrl-\ignored.- Isolated signal handling for parent and children.
echo -n,cd,pwd,export,unset,env,exit.
-
workani (Backend & Stability)
- Project architecture and initial research.
- Core execution loop: pipes, forks, and process management.
- Memory safety and leak patching.
-
mbondare (Parser & Signals)
- Lexer and parser implementation.
- Signal handling and interactive prompt.
-
Joint Effort
- Redirections, executor integration, and fixing edge cases.
Build:
makeRun:
./minishellYou can launch the verification suite shown above by following these steps:
-
Clone repository:
git clone https://github.com/LucasKuhn/minishell_tester
-
Run:
cd minishell_tester ./tester


