correctness: kill returns -1 on error

Signed-off-by: Max <max@mxzero.net>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Max 2023-11-06 02:23:49 +01:00 committed by Lukas Fleischer
parent b9a0719117
commit daa7da0d0b

View File

@ -54,7 +54,7 @@
#define DMON_ABRT(...) do { \
DMON_LOG (__VA_ARGS__); \
if (kill (getpid (), SIGINT) < 0) \
if (kill (getpid (), SIGINT) == -1) \
{ \
DMON_LOG (_("Could not stop daemon properly: %s\n"), \
strerror (errno)); \