ssize_t getline(char **lineptr, size_t *n, FILE *stream);
Description: Reads a line of text from a stream. It can be a file, a pipe or standard input
pid_t fork(void);
Description: Creates a child process by duplicating the calling process.
pid_t wait(int *wstatus);
Description: Causes the current processes to wait until of its child process terminates.
int execve(const char *pathname, char *const argv[], char *const envp[]);
Description: Execute a new programmed referred to by the pathname
variable. Here, argv[]
is an array of strings, envp[]
.......................
char *stork(chat *str, const char *delim);
Description: Breaks a string into a sequence of tokens(a sequence of characters seperated by a delim)
char *getenv(const char *name);
Description: Searches the environment list to find the environment variable name.
int stat(const char *pathname, struct stat *statbuf);
Description: Returns the information about the file in the buffer pointed to by the statbuf variable.
int access(const char *pathname, int mode);
Description: Checks whether the file pathname
can be accessed. Mode:
- F_OK: If file exits
- R_OK: If file exists and grants read permissions
- W_OK: If file exists and grants write permissions
- X_OK: If file exists and grants execute permissions
char *strdup(const char *s);
Description: Returns a pointer to a new string which is a duplicate of the string s.
int isatty(int fd);
Description: Checks if the file is opened in interactive or non-interactive mode using the file descriptor.
- Count of bytes. Result of
sizeof
operator. - Included in
<string.h>
,<sys/types.h>
, ..., etc.
- Process/User/Group identifier
<sys/types.h>
- print a system error message
<stdio.h>