svn commit: samba r2023 - branches/SAMBA_3_0/source/lib
vlendec at samba.org
vlendec at samba.org
Tue Aug 24 20:58:12 GMT 2004
Author: vlendec
Date: 2004-08-24 20:58:12 +0000 (Tue, 24 Aug 2004)
New Revision: 2023
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=2023&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:
branches/SAMBA_3_0/source/lib/pidfile.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/pidfile.c
===================================================================
--- branches/SAMBA_3_0/source/lib/pidfile.c 2004-08-24 20:52:56 UTC (rev 2022)
+++ branches/SAMBA_3_0/source/lib/pidfile.c 2004-08-24 20:58:12 UTC (rev 2023)
@@ -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