Skip to content

Custom Unix shell implementation in C focusing on processes, pipes, redirections, parsing, and signal handling.

Notifications You must be signed in to change notification settings

daniel-ploetzl/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minishell – Unix Shell Implementation (42 Vienna)

This project is a custom implementation of a Unix shell, developed as part of the 42 Vienna curriculum. It focuses on low-level process management, parsing, file descriptor handling, and signal control.

The goal is to reproduce core shell behavior while maintaining correctness, robustness, and predictable resource handling.

Scope

  • Command parsing and tokenization
  • Process creation and management (fork, execve, wait)
  • Pipes and redirections
  • Environment variable expansion
  • Built-in commands (cd, echo, pwd, export, unset, env, exit)
  • Signal handling (SIGINT, SIGQUIT)
  • Exit status propagation

Technical Focus

This project works directly with fundamental Unix primitives:

  • Processes – lifecycle control, parent/child coordination, exit codes
  • File descriptors – redirections, pipes, and I/O flow control
  • Signals – interactive behavior, interruption handling, and cleanup
  • Memory management – dynamic allocation and cleanup paths
  • Parsing – transforming raw input into executable structures

The implementation prioritizes:

  • correct resource management
  • clear execution flow
  • predictable behavior under error conditions

Security Relevance

Although not a security tool, minishell touches multiple areas relevant to defensive work:

  • process isolation and execution context
  • controlled environment variable handling
  • input parsing and validation
  • predictable signal behavior
  • avoidance of descriptor leaks and orphaned processes

These are foundational concepts for understanding how real systems behave under normal and abnormal conditions.

Contents

  • src/ – core implementation
  • inc/ – headers and interfaces
  • libft/ – supporting library (if included)
  • Makefile – build logic

Notes

This repository is a curated snapshot of the project intended to demonstrate systems-level understanding and implementation quality. It is not intended as a drop-in replacement for a production shell.

About

Custom Unix shell implementation in C focusing on processes, pipes, redirections, parsing, and signal handling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published