摘要:dup与dup2函数用于复制现存的文件描述符。原型:#include int dup(int fd);int dup2(int fd, int fd2);两函数若成功则返回新描述符,出错则返回-1。dup函数返回一个新的描述符,并且这个新描述符一定是可用描述符中数值最小的一个。dup2函数使用fd2...
阅读全文
posted @ 2014-06-15 13:36
posted @ 2014-06-15 13:36
posted @ 2014-06-15 13:34
posted @ 2014-06-15 13:20
posted @ 2014-06-15 13:18
posted @ 2014-06-15 13:12