View | Details | Raw Unified | Return to bug 199145
Collapse All | Expand All

(-)files/sympa.in (-4 / +4 lines)
Lines 51-57 Link Here
51
	if [ -f /var/run/sympa/$1.pid ] ; then
51
	if [ -f /var/run/sympa/$1.pid ] ; then
52
		pid=`head -1 /var/run/sympa/$1.pid | tr -s ' ' '|'`
52
		pid=`head -1 /var/run/sympa/$1.pid | tr -s ' ' '|'`
53
		if [ "$pid" != "" ] ; then
53
		if [ "$pid" != "" ] ; then
54
			running=`ps -A | egrep "$pid"`
54
			running=`ps -axw | grep "^[[:space:]]*$pid[[:space:]]"`
55
			if [ "$running" != "" ]; then
55
			if [ "$running" != "" ]; then
56
				echo "$1 (pid(s) $pid) is active..."
56
				echo "$1 (pid(s) $pid) is active..."
57
				return 0
57
				return 0
Lines 115-121 Link Here
115
	if [ "$pids" != "" ]; then
115
	if [ "$pids" != "" ]; then
116
	    for pid in $pids; do
116
	    for pid in $pids; do
117
		killcount=0
117
		killcount=0
118
		running=`ps -A | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"`
118
		running=`ps -axw | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"`
119
		while [ "$running" != "" ]; do
119
		while [ "$running" != "" ]; do
120
		    if [ $killcount -gt 10 ]; then
120
		    if [ $killcount -gt 10 ]; then
121
			echo 'failure'
121
			echo 'failure'
Lines 123-135 Link Here
123
		    fi
123
		    fi
124
124
125
		    kill -TERM $pid >/dev/null 2>&1
125
		    kill -TERM $pid >/dev/null 2>&1
126
		    running=`ps -A | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"`
126
		    running=`ps -axw | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"`
127
		    if [ "$running" = "" ]; then
127
		    if [ "$running" = "" ]; then
128
			runcount=`expr $runcount + 1`
128
			runcount=`expr $runcount + 1`
129
			break
129
			break
130
		    fi
130
		    fi
131
		    sleep 2
131
		    sleep 2
132
		    running=`ps -A | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"`
132
		    running=`ps -axw | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"`
133
		    if [ "$running" = "" ]; then
133
		    if [ "$running" = "" ]; then
134
			runcount=`expr $runcount + 1`
134
			runcount=`expr $runcount + 1`
135
			break
135
			break

Return to bug 199145