summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2016-12-14 17:58:22 +0200
committerPanu Matilainen <pmatilai@redhat.com>2016-12-14 18:08:39 +0200
commitab676d630088eff17c8237ad8b6d07303d58a652 (patch)
treefa34916ef9fbf96af0e0352370b00a265580f3b1
parent524a29051ecc16782c444e2869053740327fcd14 (diff)
downloadrpm-ab676d630088eff17c8237ad8b6d07303d58a652.tar.gz
Lets do something silly with the newly gained signal info argument
(sorry, found the temptation to say greetings to Lemmy overwhelming)
-rw-r--r--rpmio/rpmsq.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/rpmio/rpmsq.c b/rpmio/rpmsq.c
index 71e01b831..412efa9f3 100644
--- a/rpmio/rpmsq.c
+++ b/rpmio/rpmsq.c
@@ -24,7 +24,13 @@ typedef struct rpmsig_s * rpmsig;
static void rpmsqTerm(int signum, siginfo_t *info, void *context)
{
- rpmlog(RPMLOG_DEBUG, "exiting on signal...\n");
+ if (info->si_pid == 0) {
+ rpmlog(RPMLOG_DEBUG,
+ "exiting on signal %d (killed by death, eh?)\n", signum);
+ } else {
+ rpmlog(RPMLOG_WARNING,
+ _("exiting on signal %d from pid %d\n"), signum, info->si_pid);
+ }
exit(EXIT_FAILURE);
}