{"id":20744594,"url":"https://github.com/gab-182/minishell","last_synced_at":"2026-02-23T16:32:37.673Z","repository":{"id":136741415,"uuid":"527840885","full_name":"Gab-182/minishell","owner":"Gab-182","description":" creating a simple shell.","archived":false,"fork":false,"pushed_at":"2022-08-30T16:23:20.000Z","size":3227,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-29T14:43:45.727Z","etag":null,"topics":["bash","fork","pipe","shell"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gab-182.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-23T05:09:31.000Z","updated_at":"2024-08-29T13:18:49.000Z","dependencies_parsed_at":"2023-07-14T12:31:51.342Z","dependency_job_id":null,"html_url":"https://github.com/Gab-182/minishell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Gab-182/minishell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gab-182%2Fminishell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gab-182%2Fminishell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gab-182%2Fminishell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gab-182%2Fminishell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gab-182","download_url":"https://codeload.github.com/Gab-182/minishell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gab-182%2Fminishell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29748194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","fork","pipe","shell"],"created_at":"2024-11-17T07:16:15.976Z","updated_at":"2026-02-23T16:32:37.640Z","avatar_url":"https://github.com/Gab-182.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MiniShell\n\n## 1-Functions authorized\n\n| Functions | Lib | Prototype (linux) | Description |\n| --- | --- | --- | ---|\n| `malloc` | \u003cstdlib.h\u003e | void *malloc(size_t size); | Allocates **size** bytes and returns a pointer to the allocated memory ([heap](https://gribblelab.org/CBootCamp/7_Memory_Stack_vs_Heap.html)). [check the [man](https://man7.org/linux/man-pages/man3/malloc.3.html)] |\n| `free` | \u003cstdlib.h\u003e | void free(void *ptr);      | Frees the memory space pointed to by **ptr**, which must have been returned by a previous call to **malloc()**. [check the [man](https://man7.org/linux/man-pages/man1/free.1.html)]|\n| `write` | \u003cunistd.h\u003e |  ssize_t write(int fd, const void *buf, size_t count); | Writes up to count bytes from the buffer starting at buf to the file referred to by the file descriptor [fd](https://en.wikipedia.org/wiki/File_descriptor). [check the [man](https://www.man7.org/linux/man-pages/man2/write.2.html)] |\n| `open` | \u003csys/types.h\u003e \u003csys/stat.h\u003e \u003cfcntl.h\u003e | int open(const char *pathname, int flags); | Opens the file specified by **pathname**. [check the [man](https://man7.org/linux/man-pages/man2/open.2.html) and check about the [flags](https://stackoverflow.com/questions/53807679/whats-the-connection-between-flags-and-mode-in-open-file-function-in-c)] |\n| `read` | \u003cunistd.h\u003e | ssize_t read(int fd, void *buf, size_t count); | Read up to count bytes from file descriptor [fd](https://en.wikipedia.org/wiki/File_descriptor) into the buffer starting at **buf**. [check the [man](https://man7.org/linux/man-pages/man2/read.2.html)] |\n| `close` | \u003cunistd.h\u003e |  int close(int fd); | Closes a [file descriptor](https://en.wikipedia.org/wiki/File_descriptor), so that it no longer refers to any file and may be reused. [check the [man](https://man7.org/linux/man-pages/man2/close.2.html)] |\n| `fork` | \u003csys/types.h\u003e \u003cunistd.h\u003e | pid_t fork(void); | Creates a new process by duplicating the calling process. The new process is referred to as the child process. The calling process is referred to as the Parent process. ![diagram1](https://linuxhint.com/wp-content/uploads/2019/07/1-8.png)![diagram2](https://media.geeksforgeeks.org/wp-content/uploads/fork-and-wait.png)[check the [man](https://www.man7.org/linux/man-pages/man2/fork.2.html) and check more [details](https://www.geeksforgeeks.org/fork-system-call/) or the source of the [first diagram](https://linuxhint.com/fork_linux_system_call_c/) and the [second diagram](https://www.geeksforgeeks.org/fork-execute-processes-bottom-using-wait/)]|\n| `wait` | \u003csys/types.h\u003e \u003csys/wait.h\u003e | pid_t wait(int *wstatus); | Blocks the calling process until one of its child processes exits or a signal is received. After child process terminates, parent continues its execution after wait system call instruction. The wait function can block the caller until a child process terminates.![diagram2](https://media.geeksforgeeks.org/wp-content/uploads/Wait_system_call_in_c.jpg)[check the [man](https://man7.org/linux/man-pages/man2/wait.2.html) and the source of the [diagram](https://www.geeksforgeeks.org/wait-system-call-c/)]|\n| `waitpid` | \u003csys/types.h\u003e \u003csys/wait.h\u003e | pid_t waitpid(pid_t pid, int *wstatus, int options); | Whereas waitpid has an option that prevents it from blocking. Suspends execution of the calling process until a child specified by pid argument has changed state. The waitpid function doesn't wait for the child that terminates first, it has a number of options that control which process it waits for. [check the [man](https://man7.org/linux/man-pages/man2/wait.2.html)]|\n| `wait3` | \u003csys/types.h\u003e \u003csys/time.h\u003e \u003csys/resource.h\u003e \u003csys/wait.h\u003e | pid_t wait3(int *wstatus, int options, struct rusage *rusage); | The difference between wait and wait3 or waitpid and wait4 is that wait3 and wait4 accept an additional argument. This is the struct rusage, that returns a summary of the system resources used by the child process. [check the [man](https://man7.org/linux/man-pages/man2/wait4.2.html)]|\n| `wait4` | \u003csys/types.h\u003e \u003csys/time.h\u003e \u003csys/resource.h\u003e \u003csys/wait.h\u003e | pid_t wait4(pid_t pid, int *wstatus, int options, struct rusage *rusage); | The wait3() and wait4() system call performs the similar task to waitpid(). The core difference between them(i.e waitpid() and wait3() ,wait4()), is in terms of the resources usage information about the terminated child in the structure pointed to by the rusage argument. The information includes CPU time used by the process and memory-management statistics. [check the [man](https://man7.org/linux/man-pages/man2/wait4.2.html)]|\n| `signal` | \u003csignal.h\u003e |  typedef void (*sighandler_t)(int); sighandler_t signal(int signum, sighandler_t handler); | Is an event which is generated to notify a process or thread that some important situation has arrived. When a process or thread has received a signal, the process or thread will stop what its doing and take some action. Signal may be useful for inter-process communication. ![diagram1](https://indradhanush.github.io/images/shell-part-3/signals.jpg) [check the [man](https://man7.org/linux/man-pages/man2/signal.2.html) and check the source of the [diagram](https://indradhanush.github.io/blog/writing-a-unix-shell-part-3/)]|\n| `kill` | \u003csys/types.h\u003e \u003csignal.h\u003e |  int kill(pid_t pid, int sig); | Send a signal to a process or a group of processes specified by pid. The kill command is used to terminate processes without having to log out or reboot (i.e., restart) the computer. **Each process you start is usually completed within a few seconds. Sometimes a background process or a process without a controlling terminal hangs up and you will need to destroy this process by killing it.** \u003cbr/\u003e [check the [man](https://man7.org/linux/man-pages/man2/kill.2.html) and the [first source](https://aljensencprogramming.wordpress.com/2014/05/15/the-kill-function-in-c/) and the [second source](http://www.linfo.org/kill.html)]|\n| `exit` | \u003cunistd.h\u003e | void _exit(int status); | Terminates the calling process immediately. Any open file descriptors belonging to the process are closed and any children of the process are inherited by process 1, init, and the process parent is sent a SIGCHLD signal. Do not mix **exit** and **Exit** which are not the same thing. We are talking here about the **exit** function. [check the [man](https://man7.org/linux/man-pages/man2/exit.2.html)]|\n| `getcwd` | \u003cunistd.h\u003e | char *getcwd(char *buf, size_t size); |  Gets the path name of the current working directory. If a buffer is specified, the path name is placed in that buffer, and the address of the buffer is returned. Otherwise, getcwd() allocates space for the path name and returns a pointer to that buffer. In that instance, the user is responsible for deleting the storage when it is no longer needed by calling free() with the pointer returned by getcwd(). Copies an absolute pathname of the current working directory to the array pointed to by buf, which is of length **size**.[check the [man](https://man7.org/linux/man-pages/man3/getcwd.3.html)]|\n| `chdir` | \u003cunistd.h\u003e | int chdir(const char *path); | Used to change the current working directory. On some systems, this command is used as an alias for the shell command [cd](https://en.wikipedia.org/wiki/Cd_(command)). chdir changes the current working directory of the calling process to the directory specified in path.[check the [man](https://man7.org/linux/man-pages/man2/chdir.2.html) and the example and the [source](https://www.geeksforgeeks.org/chdir-in-c-language-with-examples/)]|\n| `stat` | \u003csys/types.h\u003e \u003csys/stat.h\u003e \u003cunistd.h\u003e | int stat(const char *pathname, struct stat *statbuf); | Return information about a file. No permissions are required on the file itself, but in the case of stat() execute (search) permission is required on all of the directories in path that lead to the file. [check the [man](https://man7.org/linux/man-pages/man2/stat.2.html)]|\n| `lstat` | \u003csys/types.h\u003e \u003csys/stat.h\u003e \u003cunistd.h\u003e | int lstat(const char *pathname, struct stat *statbuf); | Gets status information about a specified file and places it in the area of memory pointed to by buf. If the named file is a symbolic link, lstat() returns information about the symbolic link itself. [check the [man](https://man7.org/linux/man-pages/man2/stat.2.html) and the [source](https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/apis/lstat.htm)]|\n| `fstat` | \u003csys/types.h\u003e \u003csys/stat.h\u003e \u003cunistd.h\u003e |  int fstat(int fd, struct stat *statbuf); | Shall obtain information about an open file associated with the file descriptor fildes, and shall write it to the area pointed to by buf. It informs the file size by filling in the struct passed as an argument. [check the [man](https://man7.org/linux/man-pages/man2/stat.2.html) and the [source](https://stackoverflow.com/questions/20999255/get-the-status-of-a-specific-pid) and this [link](https://stackoverflow.com/questions/28288775/how-do-you-properly-use-the-fstat-function-and-what-are-its-limits) for help]|\n| `execve` | \u003cunistd.h\u003e | int execve(const char *filename, char *const argv[], char *const envp[]); | Executes the program pointed to by **filename**. **filename** must be either a binary executable, or a script starting with a line of the form \"#! interpreter *[arg]*\". In the latter case, the interpreter must be a valid pathname for an executable which is not itself a script, which will be invoked as interpreter *[arg]* **filename**. Execve() executes the program referred to by pathname. This causes the program that is currently being run by the calling process to be replaced with a new program, with newly initialized stack, heap, and (initialized and uninitialized) data segments. ![diagram](https://i.ytimg.com/vi/9fCmr__VVmQ/maxresdefault.jpg)[check the [man](https://man7.org/linux/man-pages/man2/execve.2.html) and the source of the [diagram](https://www.softprayog.in/programming/creating-processes-with-fork-and-exec-in-linux) and the [source](https://stackoverflow.com/questions/10068327/what-does-execve-do)]|\n| `dup` | \u003cunistd.h\u003e | int dup(int oldfd); | The dup() (short for \"duplicate\") system call creates a copy of a file descriptor. It uses the lowest-numbered unused descriptor for the new descriptor. \u003cbr/\u003cbr/\u003e [check the [man](https://man7.org/linux/man-pages/man2/dup.2.html) and the [source](https://www.geeksforgeeks.org/dup-dup2-linux-system-call/#:~:text=The%20dup()%20system%20call,descriptor%20for%20the%20new%20descriptor.\u0026text=They%20both%20refer%20to%20the,offset%20and%20file%20status%20flags.)]|\n| `dup2` | \u003cunistd.h\u003e | int dup2(int oldfd, int newfd); | `dup2` doesn't switch the file descriptors, it makes them equivalent. When you have part of a program that reads or write from the standard file descriptors. For example, suppose that somefunc() reads from standard input, but you want it to read from a different file from where the rest of the program is getting its standard input. The difference between dup and `dup2` is that `dup` assigns the lowest available file descriptor number, while `dup2 lets you choose the file descriptor number that will be assigned and atomically closes and replaces it if it's already taken. \u003cbr/\u003e [check the [man](https://man7.org/linux/man-pages/man2/dup.2.html) and the [first source](https://stackoverflow.com/questions/24538470/what-does-dup2-do-in-c) and the [second source](https://www.geeksforgeeks.org/piping-in-unix-or-linux/)]|\n| `pipe` | \u003cunistd.h\u003e | int pipe(int pipefd); | A pipe is a form of redirection (transfer of standard output to some other destination) that is used in Linux and other Unix-like operating systems to send the output of one command/program/process to another command/program/process for further processing. The Unix/Linux systems allow stdout of a command to be connected to stdin of another command. You can make it do so by using the pipe character. ![pipe](https://charbase.com/images/glyph/10072)  \u003cbr/\u003e pipe() creates a pipe, a unidirectional data channel that can be used for interprocess communication. The array pipefd is used to return two file descriptors referring to the ends of the pipe. pipefd[0] refers to the read end of the pipe. pipefd[1] refers to the write end of the pipe. Data written to the write end of the pipe is buffered by the kernel until it is read from the read end of the pipe. ![diagram](https://bash.cyberciti.biz/uploads/bashwiki/d/d0/Shell-pipes.png) [check the [man](https://man7.org/linux/man-pages/man2/pipe.2.html) and the source of the [diagram](https://bash.cyberciti.biz/guide/Pipes) and the [first source](https://stackoverflow.com/questions/11454343/pipe-output-to-bash-function#:~:text=To%20answer%20your%20actual%20question,function%2C%20standard%20input%20is%20ignored.) and the [second source](https://www.testingdocs.com/piping-in-linux-operating-system/)]|\n| `opendir` | \u003csys/types.h\u003e \u003cdirent.h\u003e | DIR *opendir(const char *name); | Opens a directory stream corresponding to the directory name, and returns a pointer to the directory stream. The stream is positioned at the first entry in the directory.[check the [man](https://man7.org/linux/man-pages/man3/opendir.3.html) and the [source](https://stackoverflow.com/questions/3554120/open-directory-using-c)]|\n| `readdir` | \u003cdirent.h\u003e | struct dirent *readdir(DIR *dirp); | Returns a pointer to a dirent structure representing the next directory entry in the directory stream pointed to by dirp.  It returns NULL on reaching the end of the directory stream or if an error occurred. [check the [man](https://www.man7.org/linux/man-pages/man3/readdir.3.html) and the [source](https://stackoverflow.com/questions/20265328/readdir-beginning-with-dots-instead-of-files)]|\n| `closedir` | \u003cdirent.h\u003e | int closedir(DIR *dirp); | Closes the directory stream associated with dirp. A successful call to closedir() also closes the underlying file descriptor associated with dirp. The directory stream descriptor dirp is not available after this call. \u003cbr/\u003e [check the [man](https://man7.org/linux/man-pages/man3/closedir.3p.html)]|\n| `strerror` | \u003cstring.h\u003e | char *strerror(int errnum); | Returns a pointer to a string that describes the error code passed in the argument errnum, possibly using the LC_MESSAGES part of the current locale to select the appropriate language. No other library function, including 'perror(3)', will modify this string. \u003cbr/\u003e [check the [man](https://man7.org/linux/man-pages/man3/strerror.3.html) and the [source](https://www.geeksforgeeks.org/error-handling-c-programs/)]|\n| `errno` | \u003cerrno.h\u003e | ~nothing~ | When a function is called in C, a variable named as errno is automatically assigned a code (value) which can be used to identify the type of error that has been encountered. \u003cbr/\u003e [check the [man](https://man7.org/linux/man-pages/man3/errno.3.html) and the [first source](https://www.geeksforgeeks.org/error-handling-c-programs/#:~:text=Global%20Variable%20errno%3A%20When%20a,error%20that%20has%20been%20encountered.) and the [second source](https://en.wikipedia.org/wiki/Errno.h)]|\n\n\n## 2-Definition\n\n| Words | Definition |\n| --- | --- |\n| *Process* | A process is a program in execution. Process is not as same as program code but a lot more than it. A process is an 'active' entity as opposed to program which is considered to be a 'passive' entity. Attributes held by process include hardware state, memory, CPU etc. Basically a program in execution. [Check the [first source](https://www.quora.com/What-is-the-difference-between-a-built-in-function-and-a-user-defined-function) and the [second source](https://en.wikipedia.org/wiki/Process_(computing)) and the [third source](https://www.tutorialspoint.com/operating_system/os_processes.htm) or the [fourth source](https://www.studytonight.com/operating-system/operating-system-processes)]|\n| *Child Process* | A child process is a process created by a parent process in operating system using a fork() system call. A child process may also be called a subprocess or a subtask. A child process is created as its parent process's copy and inherits most of its attributes. [Check the [source](https://www.quora.com/What-is-the-difference-between-a-built-in-function-and-a-user-defined-function)] |\n| *Parent Process* | All the processes in operating system are created when a process executes the fork() system call except the startup process. Parent process is one that creates a child process. A parent process may have multiple child processes but a child process only one parent process. ![diagram1](https://www.tutorialspoint.com/assets/questions/media/12675/Parent%20and%20Child%20Process.PNG) \u003cbr/\u003e [Check the [source](https://www.quora.com/What-is-the-difference-between-a-built-in-function-and-a-user-defined-function)] |\n| *i.e.* | Is the abbreviation for the Latin phrase id est, meaning “that is.” This abbreviation is used when you want to specify something mentioned previously; it can be used interchangeably with “specifically” or “namely”. Or  IE is a common acronym for Microsoft Internet Explorer. See our Microsoft Internet Explorer definition for additional information. [Check the [source](https://www.aje.com/arc/editing-tip-using-eg-and-ie/#:~:text=i.e.%20is%20the%20abbreviation%20for,the%20Summer%20Olympics%20three%20times.%E2%80%9D)]\n| *PATH* | Is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files (i.e., ready-to-run programs) in response to commands issued by a user. A path is a unique location to a file or a folder in a file system of an OS.A path to a file is a combination of / and alpha-numeric characters. ![diagram](https://media.geeksforgeeks.org/wp-content/uploads/absolutePathNames.jpg) \u003cbr/\u003e [Check the [first source](http://www.linfo.org/path_env_var.html#:~:text=PATH%20is%20an%20environmental%20variable,commands%20issued%20by%20a%20user.) and the [second source](https://medium.com/@jalendport/what-exactly-is-your-shell-path-2f076f02deb4) and the source of the [diagram](https://www.geeksforgeeks.org/absolute-relative-pathnames-unix/)]|\n| *buf* | (Output) A pointer to the area to which the information should be written. Buf means buffer, C uses a buffer to output or input variables. The buffer stores the variable that is supposed to be taken in (input) or sent out (output) of the program. A buffer needs to be cleared before the next input is taken in. [Check the [source](https://www.educative.io/edpresso/what-is-a-buffer-in-c)]|\n| *env* | Env(Environment) is used to either print environment variables. It is also used to run a utility or command in a custom environment. In practice, env has another common use. It is often used by shell scripts to launch the correct interpreter. In this usage, the environment is typically not changed. Env is a shell command for Unix and Unix-like operating systems. It is used to either print a list of environment variables or run another utility in an altered environment without having to modify the currently existing environment. [Check the [first source](https://docs.oracle.com/cd/E19120-01/open.solaris/819-2379/userconcept-26/index.html) and [second source](https://unix.stackexchange.com/questions/103467/what-is-env-command-doing) and [example](https://www.geeksforgeeks.org/env-command-in-linux-with-examples/)]|\n\n\n## 3-Questions and sources\n\n| Questions we can ask ourselves for this project | Link |\n| --- | --- |\n| *What is the Shell syntax ?* | [click on me](https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html)|\n| *Do you have a link about the structure (redirection, etc ...)?* | [click on me](https://www.tutorialspoint.com/unix/unix-io-redirections.htm)|\n| *Where i can start ?* | [click on me](https://www.cs.purdue.edu/homes/grr/SystemsProgrammingBook/Book/Chapter5-WritingYourOwnShell.pdf) and [click on me](https://indradhanush.github.io/blog/writing-a-unix-shell-part-1/)|\n| *What is the difference between a built-in function and a user defined function ?* | [click on me](https://www.quora.com/What-is-the-difference-between-a-built-in-function-and-a-user-defined-function) |\n| *What is the difference between wait, waitpid, wait3, wait4 ?* | [click on me](https://www.quora.com/Linux-What-is-the-difference-between-%E2%80%9Cwait%E2%80%9D-%E2%80%9Cwait3%E2%80%9D-and-%E2%80%9Cwait4%E2%80%B3-System-Call) and [click on me](https://programmer.help/blogs/linux-kernel-learning-notes-4-wait-waitpid-wait3-and-wait4.html)|\n| *What are signals ?* | [click on me](https://indradhanush.github.io/blog/writing-a-unix-shell-part-3/) and [click on me](https://www.geeksforgeeks.org/signals-c-language/) and [click one me](https://www.tutorialspoint.com/c_standard_library/c_function_signal.htm)|\n| *Why we need to kill a process ?* | [click on me](https://docstore.mik.ua/orelly/networking/puis/appc_04.htm) and [click one me](https://www.bsd.org/unixhelp.ed.ac.uk/shell/jobz5.html) and [click one me](https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/apis/sigkill.htm)|\n| *What is difference between file descriptor and fildes ?* | [click on me](https://stackoverflow.com/questions/13614040/what-is-difference-between-file-descriptor-and-fildes)|\n| *What is difference between a relative PATH and a absolute PATH ?* | [click on me](https://stackoverflow.com/questions/3915040/bash-fish-command-to-print-absolute-path-to-a-file#:~:text=A%20relative%20path%20is%20a,interpreted%20starting%20from%20another%20directory.\u0026text=Hence%20an%20absolute%20path%20is,may%20not%20contain%20symbolic%20links.) and [click on me](https://www.geeksforgeeks.org/absolute-relative-pathnames-unix/)|\n| *What is difference between dup and dup2 ?* | [click on me](https://stackoverflow.com/questions/4171126/what-do-the-dup-and-dup2-systems-really-do#:~:text=The%20difference%20between%20dup%20and,it%20if%20it's%20already%20taken.)|\n| *How to capture Control+D signal ?* | [click on me](https://stackoverflow.com/questions/1516122/how-to-capture-controld-signal)|\n| *How to get the current directory in a C program ?* | [click on me](https://stackoverflow.com/questions/298510/how-to-get-the-current-directory-in-a-c-program)|\n| *Can i have a link for Valgrind(leaks) ?* | [click on me](https://www.valgrind.org/docs/manual/mc-manual.html#mc-manual.uninitvals)|\n| *Some bonus source (in french)* | [click on me](http://paysdu42.fr/?page=minishell.c) and [click on me](https://segfault42.github.io/posts/minishell/)|\n\nNOTE:\n------\nThe credit for the READEME file is for [https://github.com/MickeyMighty]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgab-182%2Fminishell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgab-182%2Fminishell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgab-182%2Fminishell/lists"}