diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2016-12-13 08:48:53 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2016-12-13 08:55:33 +0200 |
commit | 1200b98efd8f9d15417168cd4251151125e56944 (patch) | |
tree | 28d589b9af91c9f49b7d81d4705064a4deaa032d | |
parent | 3d4db6f99f086711d2865a2a19639e417a97a21c (diff) | |
download | rpm-1200b98efd8f9d15417168cd4251151125e56944.tar.gz |
Revert "rpmdb.c: (rpmdbCheckTerminate) return non-zero on subsequent runs"
The change seems logical enough, but that doesn't work when the surrounding
code is not. rpmdbCheckTerminate() is an idiotic API by yours truly
which must return non-zero exactly once because that's the signal
for the *caller* to call exit() (did I already say idiotic?)
Anyway, if it repeatedly returns non-zero rpm will exit() more than
once which at least glibc seems to take as "so lets exit already shall we?"
This reverts commit e5d3b9f682383ee026b5a86a47eb5f288bdf8991.
-rw-r--r-- | lib/rpmdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rpmdb.c b/lib/rpmdb.c index 2dd368432..7acf14a22 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -315,7 +315,7 @@ int rpmdbCheckTerminate(int terminate) sigset_t newMask, oldMask; static int terminating = 0; - if (terminating) return terminating; + if (terminating) return 0; (void) sigfillset(&newMask); /* block all signals */ (void) sigprocmask(SIG_BLOCK, &newMask, &oldMask); |