httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: Summary of my 1.3.0 testing.
Date Thu, 04 Jun 1998 19:59:46 GMT


On Thu, 4 Jun 1998, Ben Hyde wrote:

> 2. [sun4, solaris] ps doesn't like -p 
>    (I resolved by removing it)

I wonder if something like this would be portable:

    # guess that ps -p works
    PS="ps -p"
    # assume pid 1 exists, and try a few other ps options to see
    # which one this system supports
    if ps p 1 >/dev/null 2>/dev/null; then
	PS="ps p"
    else
	if ps 1 >/dev/null 2>/dev/null; then
	    PS="ps"
	fi
    fi
    if $PS $pid >/dev/null 2>/dev/null; then
	echo $pid exists
    else
	echo $pid not there
    fi

Dean


Mime
View raw message