diff options
-rw-r--r-- | config.def.h | 2 | ||||
-rw-r--r-- | systemd/udev-block-notify.service | 2 | ||||
-rw-r--r-- | udev-block-notify.c | 8 | ||||
-rw-r--r-- | udev-block-notify.h | 2 |
4 files changed, 8 insertions, 6 deletions
diff --git a/config.def.h b/config.def.h index f3ade4f..9dde915 100644 --- a/config.def.h +++ b/config.def.h @@ -1,5 +1,5 @@ /* - * (C) 2011-2024 by Christian Hesse <mail@eworm.de> + * (C) 2011-2025 by Christian Hesse <mail@eworm.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/systemd/udev-block-notify.service b/systemd/udev-block-notify.service index 73a031d..3002051 100644 --- a/systemd/udev-block-notify.service +++ b/systemd/udev-block-notify.service @@ -1,4 +1,4 @@ -# (C) 2011-2024 by Christian Hesse <mail@eworm.de> +# (C) 2011-2025 by Christian Hesse <mail@eworm.de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/udev-block-notify.c b/udev-block-notify.c index 207044f..5cfeac5 100644 --- a/udev-block-notify.c +++ b/udev-block-notify.c @@ -1,5 +1,5 @@ /* - * (C) 2011-2024 by Christian Hesse <mail@eworm.de> + * (C) 2011-2025 by Christian Hesse <mail@eworm.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -162,8 +162,10 @@ int main (int argc, char ** argv) { notifications->notification = NULL; notifications->next = NULL; - signal(SIGINT, received_signal); - signal(SIGTERM, received_signal); + struct sigaction act = { 0 }; + act.sa_handler = received_signal; + sigaction(SIGINT, &act, NULL); + sigaction(SIGTERM, &act, NULL); #ifdef HAVE_SYSTEMD sd_notify(0, "READY=1\nSTATUS=Waiting for udev block events..."); diff --git a/udev-block-notify.h b/udev-block-notify.h index 570953b..c8ce561 100644 --- a/udev-block-notify.h +++ b/udev-block-notify.h @@ -1,5 +1,5 @@ /* - * (C) 2011-2024 by Christian Hesse <mail@eworm.de> + * (C) 2011-2025 by Christian Hesse <mail@eworm.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by |