From: Jay Freeman (saurik) Date: Sat, 31 Dec 2016 08:43:13 +0000 (-0800) Subject: It is *never* a good idea to throw away stderr :/. X-Git-Tag: cydia_1.1.28%b5~1 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/5ac0f77c5575dc06bfc0db383da984c96ce284b9?ds=inline It is *never* a good idea to throw away stderr :/. --- diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index affab956c..dd36ffa79 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/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);