Linux C函数库参考手册之其它函数

getopt(分析命令行参数)

#include <unistd.h>
int getopt(int argc, char * const argv[], const char *optstring);

isatty(判断文件描述词是否是为终端机)

#include <unistd.h>
int isatty(int fd);

poll(I/O多工机制)

#include <poll.h>
int poll(struct pollfd *fds, nfds_t nfds, int timeout);

select(I/O多工机制)

#include <sys/select.h>
int select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds, fd_set *restrict errorfds, struct timeval *restrict timeout);

ttyname(返回一终端机名称)

#include <unistd.h>
char *ttyname(int fd);

Leave a Reply

Your email address will not be published. Required fields are marked *