On 5/24/07, Carson Gaspar <[EMAIL PROTECTED]> wrote:
David Lee wrote:
> 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?
If you're testing for a pid's existence, the _only_ portable way is
'kill -0'.
this was a configure-time check to see if /proc/{pid} is supported
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems