1
0
mirror of https://github.com/golang/go synced 2024-11-25 04:07:55 -07:00

dashboard: avoid seeing cron's sh -c in ps check

R=agl1
CC=golang-dev
https://golang.org/cl/196091
This commit is contained in:
Russ Cox 2010-02-01 11:36:44 -08:00
parent 0d8797bf73
commit 0141fd3b65

View File

@ -21,8 +21,10 @@ export GOARCH=$2
# Check if we are already running. # Check if we are already running.
# First command must not be pipeline, to avoid seeing extra processes in ps. # First command must not be pipeline, to avoid seeing extra processes in ps.
all=$(ps axwwu) all=$(ps axwwu)
pid=$(echo "$all" | grep "buildcron.sh $1 $2" | grep -v $$ | awk '{print $2}') pid=$(echo "$all" | grep "buildcron.sh $1 $2" | grep -v "sh -c" | grep -v $$ | awk '{print $2}')
if [ "$pid" != "" ]; then if [ "$pid" != "" ]; then
#echo already running buildcron.sh $1 $2
#echo "$all" | grep "buildcron.sh $1 $2" | grep -v "sh -c" | grep -v $$
exit 0 exit 0
fi fi