X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=lib%2Fpidfile.c;h=368dad45080d08ac7c6154b06ef8ac4aeda134e4;hp=54a6b4c16d6ccb7444ff6dc6bb357d90f2abaa96;hb=714fb32d0377ed9f5643ed8f0bd914843d12266b;hpb=56bd0864e4c5680fee59af48228b1ec3fb97b57b diff --git a/lib/pidfile.c b/lib/pidfile.c index 54a6b4c1..368dad45 100644 --- a/lib/pidfile.c +++ b/lib/pidfile.c @@ -25,16 +25,9 @@ * First version (v0.2) released */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "system.h" +#ifndef HAVE_MINGW /* read_pid * * Reads the specified pidfile and returns the read pid. @@ -73,6 +66,7 @@ int check_pid (char *pidfile) * be found -- GW */ /* But... errno is usually changed only on error.. */ + errno = 0; if (kill(pid, 0) && errno == ESRCH) return(0); @@ -134,4 +128,4 @@ int remove_pid (char *pidfile) { return unlink (pidfile); } - +#endif