This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <unistd.h> | |
| int execl(const char *pathname, const char *arg0, ... /* (char *)0 */ ); | |
| int execv(const char *pathname, char *const argv[]); | |
| int execle(const char *pathname, const char *arg0, ... | |
| /* (char *)0, char *const envp[] */ ); | |
| int execve(const char *pathname, char *const argv[], char *const envp[]); | |
| int execlp(const char *filename, const char *arg0, ... /* (char *)0 */ ); | |
| int execvp(const char *filename, char *const argv[]); | |
| int fexecve(int fd, char *const argv[], char *const envp[]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <sys/types.h> | |
| #include <sys/wait.h> | |
| #include <sys/time.h> | |
| #include <sys/resource.h> | |
| pid_t wait3(int *statloc, int options, struct rusage *rusage); | |
| pid_t wait4(pid_t pid, int *statloc, int options, struct rusage *rusage); | |
| /* Both return: process ID if OK, 0, or −1 on error */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <sys/wait.h> | |
| int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options); | |
| /* Returns: 0 if OK, −1 on error */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <sys/wait.h> | |
| pid_t wait(int *statloc); | |
| pid_t waitpid(pid_t pid, int *statloc, int options); | |
| /* Both return: process ID if OK, 0 (see later), or −1 on error */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "unp.h" | |
| ssize_t readn(int filedes, void *buff, size_t nbytes); | |
| ssize_t writen(int filedes, const void *buff, size_t nbytes); | |
| ssize_t readline(int filedes, void *buff, size_t maxlen); | |
| /* All return: number of bytes read or written, –1 on error */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "unp.h" | |
| int sock_bind_wild(int sockfd, int family); | |
| /* Returns: 0 if OK, -1 on error */ | |
| int sock_cmp_addr(const struct sockaddr *sockaddr1, | |
| const struct sockaddr *sockaddr2, socklen_t addrlen); | |
| /* Returns: 0 if addresses are of the same family and ports are equal, | |
| else nonzero | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "unp.h" | |
| char *sock_ntop(const struct sockaddr *sockaddr, socklen_t addrlen); | |
| /* Returns: non-null pointer if OK, NULL on error */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <arpa/inet.h> | |
| int inet_pton(int family, const char *strptr, void *addrptr); | |
| /* Returns: 1 if OK, 0 if input not a valid presentation format, -1 on error */ | |
| const char *inet_ntop(int family, const void *addrptr, char *strptr, size_t len); | |
| /* Returns: pointer to result if OK, NULL on error */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <arpa/inet.h> | |
| int inet_aton(const char *strptr, struct in_addr *addrptr); | |
| /* Returns: 1 if string was valid, 0 on error */ | |
| in_addr_t inet_addr(const char *strptr); | |
| /* Returns: 32-bit binary network byte ordered IPv4 address; INADDR_NONE if error */ | |
| char *inet_ntoa(struct in_addr inaddr); | |
| /* Returns: pointer to dotted-decimal string */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <string.h> | |
| void *memset(void *dest, int c, size_t len); | |
| void *memcpy(void *dest, const void *src, size_t nbytes); | |
| int memcmp(const void *ptr1, const void *ptr2, size_t nbytes); | |
| /* Returns: 0 if equal, <0 or >0 if unequal (see text) */ |