From 5e3224c57dea1292a951d5b8327fb84629fc1f59 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 11 Apr 2024 23:21:43 +0200 Subject: [PATCH] dmeventd: no log when after unlink file is gone Check for errno ENOENT. TODO: there should be global wrapper for this... --- daemons/dmeventd/dmeventd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index 2c2816ef2..6709ba9bb 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -1932,14 +1932,14 @@ out: static void _remove_files_on_exit(void) { - if (unlink(DMEVENTD_PIDFILE)) + if (unlink(DMEVENTD_PIDFILE) && (errno != ENOENT)) log_sys_debug("unlink", DMEVENTD_PIDFILE); if (!_systemd_activation) { - if (unlink(DM_EVENT_FIFO_CLIENT)) + if (unlink(DM_EVENT_FIFO_CLIENT) && (errno != ENOENT)) log_sys_debug("unlink", DM_EVENT_FIFO_CLIENT); - if (unlink(DM_EVENT_FIFO_SERVER)) + if (unlink(DM_EVENT_FIFO_SERVER) && (errno != ENOENT)) log_sys_debug("unlink", DM_EVENT_FIFO_SERVER); } }