summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-10-01 13:19:59 +0200
committerGravatar Christian Hesse <mail@eworm.de>2014-10-01 13:19:59 +0200
commit1008e35a3ad996280992080832bb54ad9bd9f36e (patch)
treeb1bd5885a4f3c27685aad9b4fd14343e7839f8d0
parent2c3ad1ea4a72bb3561a0c200d0ac16cd5b381b3d (diff)
downloadmpd-notification-1008e35a3ad996280992080832bb54ad9bd9f36e.tar.gz
mpd-notification-1008e35a3ad996280992080832bb54ad9bd9f36e.tar.zst
print signal name
-rw-r--r--mpd-notification.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mpd-notification.c b/mpd-notification.c
index 00a9110..0e35664 100644
--- a/mpd-notification.c
+++ b/mpd-notification.c
@@ -33,7 +33,7 @@ void received_signal(int signal) {
case SIGINT:
case SIGTERM:
if (verbose > 0)
- printf("Received signal %d, preparing exit.\n", signal);
+ printf("Received signal %s, preparing exit.\n", strsignal(signal));
doexit++;
mpd_send_noidle(conn);
@@ -42,7 +42,7 @@ void received_signal(int signal) {
case SIGHUP:
case SIGUSR1:
if (verbose > 0)
- printf("Showing last notification again.\n");
+ printf("Received signal %s, showing last notification again.\n", strsignal(signal));
if (!notify_notification_show(notification, &error)) {
g_printerr("%s: Error \"%s\" while trying to show notification again.\n", program, error->message);
@@ -50,7 +50,7 @@ void received_signal(int signal) {
}
break;
default:
- fprintf(stderr, "Reveived signal %d, no idea what to do...\n", signal);
+ fprintf(stderr, "Reveived signal %s (%d), no idea what to do...\n", strsignal(signal), signal);
}
}