⚠️ Notice on Source Code Availability: The source codes for this project are currently hosted on the highly restricted internal servers (Vogsphere) of the 42 Network. Full source code migration to this public repository is scheduled and will be completed soon. Below is the architectural documentation and technical constraints of the project.
This project is a comprehensive implementation of a custom UNIX shell from scratch. The core engineering focus was on parsing complex command-line inputs and managing underlying system processes, directly reflecting the foundational principles of Operating System development and low-level execution logic.
- Abstract Syntax Tree (AST): Architected a custom lexer and parser in C to tokenize inputs and build an AST, enabling the accurate evaluation of operator precedence, pipes, and complex execution logic.
- POSIX Process Management: Engineered robust process trees utilizing fundamental UNIX system calls (
fork,execve,waitpid) to manage parent-child execution states seamlessly. - IPC & I/O Redirection: Implemented inter-process communication (IPC) through pipes and managed complex file descriptor routing (
dup2) for input/output redirection.
- Developed robust signal handling mechanisms (
SIGINT,SIGQUIT) to ensure the shell reacts intuitively without crashing, mirroring the behavior of bash. - Engineered strict memory management protocols to prevent leaks during child process terminations and parsing errors.
- Valgrind tested:
All heap blocks were freed -- no leaks are possible.
Developed as part of the 42 Network Common Core Curriculum.