diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-06-03 12:10:02 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-06-03 12:10:02 +0300 |
commit | 0863a4420ba0569da1edb0dd8018ce7f62c25a28 (patch) | |
tree | a84b8ac28318e52b4f6d4aa779ab7710ca84411a /lib/rpmdb.c | |
parent | cd040ba59b00ce709fa97016df9eaf733adc1ccf (diff) | |
download | rpm-0863a4420ba0569da1edb0dd8018ce7f62c25a28.tar.gz rpm-0863a4420ba0569da1edb0dd8018ce7f62c25a28.tar.bz2 rpm-0863a4420ba0569da1edb0dd8018ce7f62c25a28.zip |
Use rpmsqIsCaught() instead of directly accessing rpmsqCaught sigset
Diffstat (limited to 'lib/rpmdb.c')
-rw-r--r-- | lib/rpmdb.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/rpmdb.c b/lib/rpmdb.c index a98b37ad4..cb6ea8f40 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -610,11 +610,11 @@ int rpmdbCheckTerminate(int terminate) (void) sigfillset(&newMask); /* block all signals */ (void) sigprocmask(SIG_BLOCK, &newMask, &oldMask); - if (sigismember(&rpmsqCaught, SIGINT) - || sigismember(&rpmsqCaught, SIGQUIT) - || sigismember(&rpmsqCaught, SIGHUP) - || sigismember(&rpmsqCaught, SIGTERM) - || sigismember(&rpmsqCaught, SIGPIPE) + if (rpmsqIsCaught(SIGINT) > 0 + || rpmsqIsCaught(SIGQUIT) > 0 + || rpmsqIsCaught(SIGHUP) > 0 + || rpmsqIsCaught(SIGTERM) > 0 + || rpmsqIsCaught(SIGPIPE) > 0 || terminate) terminating = 1; @@ -641,9 +641,7 @@ int rpmdbCheckTerminate(int terminate) int rpmdbCheckSignals(void) { if (rpmdbCheckTerminate(0)) { - /* sigset_t is abstract type */ - rpmlog(RPMLOG_DEBUG, "Exiting on signal(0x%lx) ...\n", - *((unsigned long *)&rpmsqCaught)); + rpmlog(RPMLOG_DEBUG, "Exiting on signal...\n"); exit(EXIT_FAILURE); } return 0; |