summaryrefslogtreecommitdiff
path: root/src/pacman
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2015-11-30 12:10:58 -0500
committerAllan McRae <allan@archlinux.org>2015-12-05 18:07:24 +1000
commit85508b478e23ef225afccf5ec27dffb39a0300c9 (patch)
tree131d9e872b89f4ef54f6e02fa6aaa1d7e77e800f /src/pacman
parent7fb8a299c2a2e18eed21694ba24cf8959aa830dd (diff)
do not catch SIGTERM
On SIGTERM pacman was exiting immediately, even in the middle of a transaction. In this case we should leave the lock file in place as an indication that the database may not be in a consistent state. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman')
-rw-r--r--src/pacman/pacman.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 1d4459e3..d6ceeae0 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -334,8 +334,7 @@ static void handler(int signum)
columns_cache_reset();
return;
}
- /* SIGINT/SIGHUP: no committing transaction, release it now and then exit pacman
- * SIGTERM: release no matter what */
+ /* SIGINT/SIGHUP: no committing transaction, release it now and then exit pacman */
alpm_unlock(config->handle);
/* output a newline to be sure we clear any line we may be on */
xwrite(out, "\n", 1);
@@ -1138,7 +1137,7 @@ int main(int argc, char *argv[])
int ret = 0;
size_t i;
struct sigaction new_action, old_action;
- const int signals[] = { SIGHUP, SIGINT, SIGTERM, SIGSEGV, SIGWINCH };
+ const int signals[] = { SIGHUP, SIGINT, SIGSEGV, SIGWINCH };
uid_t myuid = getuid();
/* Set signal handlers */