]> git.saurik.com Git - apt.git/commitdiff
It is *never* a good idea to throw away stderr :/.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 31 Dec 2016 08:43:13 +0000 (00:43 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 31 Dec 2016 08:43:13 +0000 (00:43 -0800)
apt-pkg/contrib/fileutl.cc

index affab956c9a2ba29f20a49bb9bdbf7c5eb44c01a..dd36ffa790070a2cb3648aa5dd5411223a5cde24 100644 (file)
@@ -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);