Skip to content

Commit

Permalink
correctness: kill returns -1 on error
Browse files Browse the repository at this point in the history
Signed-off-by: Max <max@mxzero.net>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
  • Loading branch information
Max authored and Lukas Fleischer committed Nov 6, 2023
1 parent b9a0719 commit daa7da0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)); \
Expand Down

0 comments on commit daa7da0

Please sign in to comment.