diff options
author | Julian Andres Klode <jak@debian.org> | 2021-01-22 17:05:01 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2021-01-22 17:05:01 +0000 |
commit | 6e28a7cdb94855c7305c67c2dd33e5ce454e944a (patch) | |
tree | 242cba23ecf330190ea1e522e010bdb37d0c535a | |
parent | cef9e97fec59c5e09ec37646168cfd1cf57fd24b (diff) | |
parent | acbe227d50178657d98a609221b1caa5b128d7bb (diff) |
Merge branch 'youfu-ExecDpkg-patch' into 'master'
fix passing readonly /dev/null fd as stdout/stderr
See merge request apt-team/apt!153
-rw-r--r-- | apt-pkg/deb/debsystem.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index eac43c3b7..a0200305d 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -420,7 +420,7 @@ pid_t debSystem::ExecDpkg(std::vector<std::string> const &sArgs, int * const inp pid_t const dpkg = ExecFork(); if (dpkg == 0) { - int const nullfd = open("/dev/null", O_RDONLY); + int const nullfd = open("/dev/null", O_RDWR); if (inputFd == nullptr) dup2(nullfd, STDIN_FILENO); else |