diff options
author | Michael Vogt <mvo@debian.org> | 2013-07-28 09:25:57 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-07-28 09:25:57 +0200 |
commit | 0c33605d981ceb78a4761e39043dc79ef9a571b2 (patch) | |
tree | 83fa22dda53f0abccd7b9cf7376af8553c559068 /cmdline/apt-mark.cc | |
parent | 402c0d19a0c6668d7710b2b48561eb3059a04584 (diff) | |
parent | 163dc55bd6891008adcdf6d683a94e890a00f8c7 (diff) |
Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sid
Diffstat (limited to 'cmdline/apt-mark.cc')
-rw-r--r-- | cmdline/apt-mark.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc index c5b7ca496..4c0fc2893 100644 --- a/cmdline/apt-mark.cc +++ b/cmdline/apt-mark.cc @@ -202,13 +202,13 @@ bool DoHold(CommandLine &CmdL) if (dpkgAssertMultiArch == 0) { std::string const chrootDir = _config->FindDir("DPkg::Chroot-Directory"); - if (chrootDir != "/" && chroot(chrootDir.c_str()) != 0) - _error->WarningE("getArchitecture", "Couldn't chroot into %s for dpkg --assert-multi-arch", chrootDir.c_str()); // redirect everything to the ultimate sink as we only need the exit-status int const nullfd = open("/dev/null", O_RDONLY); dup2(nullfd, STDIN_FILENO); dup2(nullfd, STDOUT_FILENO); dup2(nullfd, STDERR_FILENO); + if (chrootDir != "/" && chroot(chrootDir.c_str()) != 0) + _error->WarningE("getArchitecture", "Couldn't chroot into %s for dpkg --assert-multi-arch", chrootDir.c_str()); execvp(Args[0], (char**) &Args[0]); _error->WarningE("dpkgGo", "Can't detect if dpkg supports multi-arch!"); _exit(2); |