On Thu, 24 May 2007, Andrew Beekhof wrote: > On 5/24/07, Kevin Jamieson <[EMAIL PROTECTED]> wrote: > > Brian Reichert wrote: > > > > > What I tracked down was that if the box powered down too quickly > > > for heartbeat to clean up, a PID file was left in place: > > > > > > ... > > > > > > But, there's no check to assure the recorded PID is not stale. > > > > > > Have others seen this? This code seems to be in 2.0.8 as well... > > > > FYI, I filed a bug on this a few months back: > > > > http://old.linux-foundation.org/developer_bugzilla/show_bug.cgi?id=1454 > > > > There's a patch attached to that bug that worked for us (although the > > patch is Linux-specific, so may not be ideal). > > I took a few moments to modify the patch so that non-linux systems dont > break. > > Will commit momentarily.
Andrew: Thanks for doing that, especially the concern for the non-Linux systems. That concern is much appreciated. Alas: The "test -e" that attempts to do this is itself non-portable (so bad shell syntax etc.). I think the relevant (for this context) flags that seem to be common across a variety of OSes (for portability) are: -f: exists and is a regular file -d: exists and is a directory -r: exists and is readable -x: exists and is executable How to proceed? On my local systems which have "/proc", the pid-like entries seem to be directories. On one of them it is "dr-xr-xr-x", on another it is "dr-x--x--x". On the basis of that, would "test -d" be better? Also, the update has "echo ..." to print configure's output. The official "configure" method to achieve that is (as I understand it) the AC_MSG_*() family of macros. Sorry to be negative on that aspect. The rest of the update seems to be a nice abstraction and structure! Thanks, -- : David Lee I.T. Service : : Senior Systems Programmer Computer Centre : : UNIX Team Leader Durham University : : South Road : : http://www.dur.ac.uk/t.d.lee/ Durham DH1 3LE : : Phone: +44 191 334 2752 U.K. : _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
