diff --git a/pidfilefn.c b/pidfilefn.c index e8c686f..91adccb 100644 --- a/pidfilefn.c +++ b/pidfilefn.c @@ -19,7 +19,6 @@ #include #include #include -#include extern char *chomp(char *str); @@ -46,9 +45,6 @@ int pidfile_read(const char *pidfile) return -1; } - if (access(pidfile, F_OK) < 0) - return -1; - fp = fopen(pidfile, "r"); if (!fp) return -1; @@ -89,7 +85,7 @@ int pidfile_signal(const char *pidfile, int signal) ret = kill(pid, signal); if ((ret == -1) || (signal == SIGTERM) || (signal == SIGKILL)) - remove(pidfile); + (void)remove(pidfile); return 0; }