linux 系统编程 dup(2)和dup2(2)文件重定向

摘自:《Linux C编程一站式学习》

使用dup和dup2系统调用,需要判断返回值,如果返回值为-1,重定向失败

原文地址:https://www.cnblogs.com/rocklee25/p/7398107.html