浏览代码

It is *never* a good idea to throw away stderr :/.

Jay Freeman (saurik) 9 年之前
父节点
当前提交
5ac0f77c55
共有 1 个文件被更改,包括 0 次插入6 次删除
  1. 0 6
      apt-pkg/contrib/fileutl.cc

+ 0 - 6
apt-pkg/contrib/fileutl.cc

@@ -1956,12 +1956,6 @@ public:
 	       dup2(compressed_fd,STDIN_FILENO);
 	    dup2(Pipe[1],STDOUT_FILENO);
 	 }
-	 int const nullfd = open("/dev/null", O_WRONLY);
-	 if (nullfd != -1)
-	 {
-	    dup2(nullfd,STDERR_FILENO);
-	    close(nullfd);
-	 }
 
 	 SetCloseExec(STDOUT_FILENO,false);
 	 SetCloseExec(STDIN_FILENO,false);