Code Monkey home page Code Monkey logo

42pipex's Introduction

42 Pipex

In progress, knowledge compiling

1. Commands used for the project

Formula Name Description Formula
Access check the accessibility of a file named by the path argument for the access persmission indicated by the mode argument int access(const char* pathname, int mode);
Close close a file descriptor int close(int fd);
Dup duplicates an existing object descriptor and returns its value to the calling process int dup(int oldfd);
Dup2 performs the same task as dup(), it return the newfd as the oldfd int dup2(int oldfd, int newfd);
Execve executes the program refered to by pathname. This causes the program that is currently being run by the called process to be replaced with a new program. int execve(const char* pathname, char* const argv[], char* const envp[]);
Exit exit is used to exit the shell where it is currently running. It takes one parameter as [n] and exits the shell with a return of status n. exit(n);
Fork creates a new process by duplicating the calling process. The new process is referred to as the child process. pid_t fork(void);
Free frees dynamically allocated memory of a pointer free(options);
Malloc allocates memory to a pointer variable type void* malloc(size_t size);
Open opens a file descriptor int open(const char* pathname, int flags);
Perror print a system error message readable by humans void perror(const char* s);
Pipe creates a pipe, a unidirectional data channel that can be used for interprocess communication. int pipe(int piepfd[2]);
Read reads from a specified file descriptor ssize_t read(int fd, void* buf, size_t count);
Sterror returns a pointer to a string that describes the error code passerd in the argument errnum char* strerror (int errnum);
Unlink delete a name from the filesystem. If that name was the last link to a file and no processes have the file open, the file is delete and the space it was using is made available for reuse. int unlink(const char* pathname);
Wait suspend the execution of the calling thread until one of its children terminates. pid_t wait(int* wstatus);
Waitpid suspends execution of the calling thread until a child sepcified by pid argument has. changed state. pid_t waitpid(pid_t pid, int* wstatus, int options);
Write writes characters ssize_t write(int fd, cosnt void* buf, size_t count);

42pipex's People

Contributors

pgcl1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.