https://github.com/usercrixus/42exam4
42 exam rank4 solution by @achaisne
https://github.com/usercrixus/42exam4
Last synced: about 1 year ago
JSON representation
42 exam rank4 solution by @achaisne
- Host: GitHub
- URL: https://github.com/usercrixus/42exam4
- Owner: usercrixus
- Created: 2025-02-28T11:18:34.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-05-06T04:35:37.000Z (about 1 year ago)
- Last Synced: 2025-05-06T05:29:32.098Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Microshell 42 exam4
This project implements a minimal Unix shell emulator in C that supports:
command execution with execve
pipelines (|)
command sequencing (;)
the cd built-in command with basic error handling
## Features
Execute external programs using execve
Support for | (piping) between commands
Support for ; (sequential execution)
Built-in cd command
Error output to stderr using write(2, ...)
Minimal memory usage, no dynamic memory allocation
## Source Overview
int std_in; // Backup of original stdin
void printt_err(char *str); // Custom error message printer to stderr
void ft_exec(char **argv, int limit, char **envp); // Core function to execute a command or pipe
int main(int argc, char **argv, char **envp); // Argument parser and command dispatcher
Good luck. Don't panic. feel free to visit me at school.