From 792b1971bb971d797c232b80c0a700e02c812cc8 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 29 Apr 2005 21:21:24 +0000 Subject: [PATCH] variables in a signal handler should be static volatile sig_atomic_t --- lib/event/libdm-event.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/event/libdm-event.c b/lib/event/libdm-event.c index b9ffb83..978b673 100644 --- a/lib/event/libdm-event.c +++ b/lib/event/libdm-event.c @@ -142,9 +142,11 @@ log_print("%s: \"%s\"\n", __func__, msg->msg); return msg->opcode.status; } -static int daemon_running = 0; -static void daemon_running_signal_handler(int sig){ - daemon_running=1; +static volatile sig_atomic_t daemon_running = 0; + +static void daemon_running_signal_handler(int sig) +{ + daemon_running = 1; } /* start_daemon -- 2.43.5