svn commit: samba r2024 - trunk/source/lib
vlendec at samba.org
vlendec at samba.org
Tue Aug 24 20:58:27 GMT 2004
Author: vlendec
Date: 2004-08-24 20:58:26 +0000 (Tue, 24 Aug 2004)
New Revision: 2024
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=2024&nolog=1
Log:
If there's garbage in the pidfile, we should not panic but assume that no one
else is around. We can't find the other guy anyway.
Volker
Modified:
trunk/source/lib/pidfile.c
Changeset:
Modified: trunk/source/lib/pidfile.c
===================================================================
--- trunk/source/lib/pidfile.c 2004-08-24 20:58:12 UTC (rev 2023)
+++ trunk/source/lib/pidfile.c 2004-08-24 20:58:26 UTC (rev 2024)
@@ -49,6 +49,13 @@
}
ret = atoi(pidstr);
+
+ if (ret == 0) {
+ /* Obviously we had some garbage in the pidfile... */
+ DEBUG(1, ("Could not parse contents of pidfile %s\n",
+ pidFile));
+ goto noproc;
+ }
if (!process_exists((pid_t)ret)) {
goto noproc;
More information about the samba-cvs
mailing list