open, close, read, write, malloc, free
New function :
perror : void perror(const char *str);
Funtion name | Library | Prototype | Descriptio | Source Link |
---|---|---|---|---|
perror | "stdio.h" | void perror(const char *str) |
Prints a descriptive error message to stderr. |
more info |
strerror | "stdio.h" "errno.h" "string.h" | char *strerror(int errnum) |
Searches an internal array for the error number errnum and returns a pointer to an error message string. The error strings produced by strerror depend on the developing platform and compiler. |
more info |
access | "unistd.h" | int access(const char *pathname, int mode) |
Check whether a file exists or not / first argument takes the path to the directory/file and the second argument takes flags R_OK, W_OK, X_OK or F_OK. |
more info |
dup && dup2 | "unistd.h" | int dup(int fildes) int dup2(int fildes, int fildes2) |
The dup() system call creates a copy of a file descriptor The dup2() system call is similar to dup() but the basic difference between them is that instead of using the lowest-numbered unused file descriptor, it uses the descriptor number specified by the user. |
more info |
execve | "unistd.h" | int execve(const char *path, char *const argv[], char *const envp[]) |
The execve() function replaces the current process image with a new process image specified by path. The new image is constructed from a regular, executable file called the new process image file |
more info |
exit | "stdio.h" | void exit (int code) |
Used to break out of a loop. This function causes an immediate termination of the entire program done by the operation system. |
more info |