Piscine Modules | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
Piscine Exams | |||||
---|---|---|---|---|---|
|
Common Core Projects | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Common Core Exams | ||||||
---|---|---|---|---|---|---|
|
3rd 42 School Exam
Piscine Modules | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
Piscine Exams | |||||
---|---|---|---|---|---|
|
Common Core Projects | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Common Core Exams | ||||||
---|---|---|---|---|---|---|
|
You deleted implementation about pipe in this commit.
So the current program on master branch don't allow us to use pipe for example $>./microshell /bin/ls "|" /usr/bin/grep microshell ";" /bin/echo i love my microshell
You have to add a protection in the write_error to avoid a segfault when string or argv are NULL.
it is reported that using the __environ
is not allowed in the test.
In general, it's recommended to use environ
rather than __environ
, because environ is standardized by POSIX and is more portable across different systems. The __environ variable is not standardized and might not be available on all systems.
I would advise to use:
extern char **environ;
which is not a global and it is posix compliant.
I just passed microshell with shorter code.
gist
This subject is no need to dupplicate 0 in fd for backup. it no use in this subject.
A lot of big mistakes in this code, it s odd that the moulinette allowed this to pass :
STDIN and STDOUT are not restored at the end of a pipeline, args like ./microshell "/bin/echo" "a" "|" "/bin/cat" "-e" "|" "/bin/wc" "-l" ";" "/bin/cat" will not work correctly (the last cat should read on STDIN).
Commands in a pipeline do not work simultaneously, args like ./microshell "/bin/yes" "|" "head" "-n" "20" will result in an infinite loop because the 'head' command will never start and cant sigpipe the first command. You must launch each command of the pipeline before waiting with waitpid.
It's disappointing to promote this kind of program even though the moulinette won't KO it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.