← Project archive

minishell

42 Lisboa · Collaborative systems project

A shell looks simple at the prompt. Underneath, it is a chain of decisions about parsing, processes, file descriptors, signals, ownership, and cleanup.

Flagship case study2026

$ echo a | cat > outexit 0

ownership follows every branch

Year
2026
Language
C
Context
42 Lisboa
Stack
C · Readline · Parsing · Unix Processes
Collaborator
Guilherme

What I owned.

01 · Personal contribution

The work was split between parsing and execution. Biraj handled the execution side after parsing: pipelines and redirections, built-ins, signals, external commands, and the memory work needed to keep those paths reliable.

How the parts meet.

02 · Architecture

  1. 01

    Command handoff

    The parsed command structure becomes an execution plan that distinguishes built-ins, external programs, redirections, and pipeline stages.

  2. 02

    Process orchestration

    Forks, pipes, duplicated file descriptors, exit statuses, and signal behavior are coordinated without leaking resources between parent and child paths.

  3. 03

    Lifecycle discipline

    Environment state and temporary allocations have explicit cleanup paths, including failures and heredoc interruption.

Where understanding had to deepen.

03 · Hardest problem

Memory leaks were the hardest challenge. I traced every failure path from allocation to cleanup.

What held up.

04 · Result

The finished shell supports the expected interactive workflow and a broad execution surface, while the repository records iterative fixes across pipes, parsing boundaries, and leak detection.

What I carry forward.

05 · Reflection

The project changed debugging from a last step into part of the design. If ownership is unclear when a resource is created, it will be even less clear when an execution path fails.

The honest record.

Margin notes

  • 01

    Curriculum project completed at 42 Lisboa

  • 02

    My focus: execution, signals, and memory cleanup

  • 03

    Repository includes Valgrind and community tester targets

Inspect the work, or start a conversation.

View repository Discuss this work