|
@@ -417,7 +417,6 @@ bool pkgDPkgPM::SendPkgsInfo(FILE * const F, unsigned int const &Version)
|
|
|
bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
|
|
bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
|
|
|
{
|
|
{
|
|
|
bool result = true;
|
|
bool result = true;
|
|
|
- static bool interrupted = false;
|
|
|
|
|
|
|
|
|
|
Configuration::Item const *Opts = _config->Tree(Cnf);
|
|
Configuration::Item const *Opts = _config->Tree(Cnf);
|
|
|
if (Opts == 0 || Opts->Child == 0)
|
|
if (Opts == 0 || Opts->Child == 0)
|
|
@@ -425,9 +424,8 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
|
|
|
Opts = Opts->Child;
|
|
Opts = Opts->Child;
|
|
|
|
|
|
|
|
sighandler_t old_sigpipe = signal(SIGPIPE, SIG_IGN);
|
|
sighandler_t old_sigpipe = signal(SIGPIPE, SIG_IGN);
|
|
|
- sighandler_t old_sigint = signal(SIGINT, [](int signum){
|
|
|
|
|
- interrupted = true;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ sighandler_t old_sigint = signal(SIGINT, SIG_IGN);
|
|
|
|
|
+ sighandler_t old_sigquit = signal(SIGQUIT, SIG_IGN);
|
|
|
|
|
|
|
|
unsigned int Count = 1;
|
|
unsigned int Count = 1;
|
|
|
for (; Opts != 0; Opts = Opts->Next, Count++)
|
|
for (; Opts != 0; Opts = Opts->Next, Count++)
|
|
@@ -528,9 +526,7 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
|
|
|
}
|
|
}
|
|
|
signal(SIGINT, old_sigint);
|
|
signal(SIGINT, old_sigint);
|
|
|
signal(SIGPIPE, old_sigpipe);
|
|
signal(SIGPIPE, old_sigpipe);
|
|
|
-
|
|
|
|
|
- if (interrupted)
|
|
|
|
|
- result = _error->Error("Interrupted");
|
|
|
|
|
|
|
+ signal(SIGQUIT, old_sigquit);
|
|
|
|
|
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|