index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Chantry Xavier <shiningxc@gmail.com> | 2007-09-08 00:36:38 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-09-16 20:17:44 -0500 |
commit | b0aa51059233849b0a7ef8d6a851750776ce6645 (patch) | |
tree | 29341593cb82011f65e901aa63bc76f7449d85a2 /src | |
parent | 046c8a6819a0533fb10434f30100f80bb960fe46 (diff) |
-rw-r--r-- | src/pacman/pacman.c | 11 |
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 2b748a1c..aa128261 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -207,9 +207,14 @@ static void cleanup(int signum) pm_fprintf(stderr, PM_LOG_ERROR, "Internal pacman error: Segmentation fault.\n" "Please submit a full bug report with --debug if appropriate.\n"); exit(signum); - } else if((signum == SIGINT) && (alpm_trans_release() == -1) - && (pm_errno == PM_ERR_TRANS_COMMITING)) { - return; + } else if((signum == SIGINT)) { + if(alpm_trans_interrupt() == 0) { + /* a transaction is being interrupted, don't exit pacman yet. */ + return; + } else { + /* no commiting transaction, we can release it now and then exit pacman */ + alpm_trans_release(); + } } /* free alpm library resources */ |