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); |