MINISHELL


📌 Overview

42Seoul C 기반 간단한 shell 구현

항목 내용
기간 2024.05 ~ 2024.06
스택 C Makefile readline fork() execve() pipe() dup2()
2인
담당 Cmd / Pipe Redirection


🧩 Core features



🏗️ System Architecture

architecture


Layer Responsibility
Input readline prompt, history 관리
Parser quote, dollar expansion, pipe, redirection, heredoc 처리
Node command, path, input fd, output fd, previous error number 저장
Exec builtin dispatch, fork, pipe, dup2, wait, execve 처리
Env environment linked list 생성, 추가, 삭제, 배열 변환
Signal prompt, child, heredoc signal handler 관리


🚨 Key Decisions & Troubleshooting

command node 기반 실행 구조


pipe 연속 생성 시 fd 누수 문제 해결


builtin과 외부 명령 실행 분리