Skip to content

School project: third exam of the mandatory part of new 42 cursus.

Notifications You must be signed in to change notification settings

llefranc/42_exam_rank_04

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exam_rank_04 (@42Paris)

About

Third exam of the new 42 cursus. You will have to recode a small shell (cd, execve and pipes).

You can test your own microshell with the tests inside some_tests file and compare your results with bash.

It's really important to protect your syscalls with the fatal function (especially syscalls implicating file descriptors like dup, pipe... They will test your microshell with wrong fds).

Check also if you're not leaking file descriptors with lsof -c microshell (put an infinite loop at the end of your main when testing this). You should have only stdin, stdout and stderr open (respectively 1u, 2u and 3u).

Tests /bin/cat "|" /bin/ls and /bin/cat /dev/urandom "|" /usr/bin/head -c 10 should work like in bash. Look SIGPIPE signal for more information.

This project was code for MACOS

Building and running the project

  1. Download/Clone this repo

     git clone https://github.com/lucaslefrancq/42_exam_rank_04.git
    
  2. cd into the root directory then run make.

     cd 42_exam_rank_04
     make
    

Sources

About

School project: third exam of the mandatory part of new 42 cursus.

Topics

Resources

Stars

Watchers

Forks