diff options
-rw-r--r-- | cmdline/apt-dump-solver.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cmdline/apt-dump-solver.cc b/cmdline/apt-dump-solver.cc index e94021fcf..24a9f23eb 100644 --- a/cmdline/apt-dump-solver.cc +++ b/cmdline/apt-dump-solver.cc @@ -99,6 +99,7 @@ int main(int argc,const char *argv[]) /*{{{*/ FileFd forward; if (is_forwarding_dumper) { + signal(SIGPIPE, SIG_IGN); int external[] = {-1, -1}; if (pipe(external) != 0) return 250; @@ -154,13 +155,6 @@ int main(int argc,const char *argv[]) /*{{{*/ forward.Close(); dump.Close(); - if (_error->PendingError()) - { - std::ostringstream out; - out << "Writing EDSP solver input to file '" << filename << "' failed due to write errors!\n"; - return WriteError("ERR_WRITE_ERROR", out, stdoutfd, Solver); - } - if (is_forwarding_dumper) { // Wait and collect the error code @@ -179,6 +173,12 @@ int main(int argc,const char *argv[]) /*{{{*/ else return 255; } + else if (_error->PendingError()) + { + std::ostringstream out; + out << "Writing EDSP solver input to file '" << filename << "' failed due to write errors!\n"; + return WriteError("ERR_WRITE_ERROR", out, stdoutfd, Solver); + } else EDSP::WriteError("ERR_JUST_DUMPING", "I am too dumb, i can just dump!\nPlease use one of my friends instead!", stdoutfd); return 0; |