From: Ivo Timmermans Date: Fri, 24 Nov 2000 14:13:06 +0000 (+0000) Subject: Set errno to 0 before trying to kill the other process. X-Git-Tag: import-tinc-1.1~785^2~671 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=4cb4a7d298d560593f84d974bf77d0ee8a911a50;p=meshlink Set errno to 0 before trying to kill the other process. --- diff --git a/lib/pidfile.c b/lib/pidfile.c index 54a6b4c1..a954d18f 100644 --- a/lib/pidfile.c +++ b/lib/pidfile.c @@ -73,6 +73,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);