~ubuntu-branches/ubuntu/trusty/ceph/trusty-proposed

« back to all changes in this revision

Viewing changes to src/test/mon/mon-test-helpers.sh

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-01-23 16:29:08 UTC
  • mfrom: (0.3.21)
  • Revision ID: package-import@ubuntu.com-20150123162908-5rsgaz037l7f3nqs
Tags: 0.80.8-0ubuntu0.14.04.1
New upstream stable point release (LP: #1413917).

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
function kill_daemons() {
60
60
    local dir=$1
61
61
    for pidfile in $(find $dir | grep pidfile) ; do
 
62
        pid=$(cat $pidfile)
62
63
        for try in 0 1 1 1 2 3 ; do
63
 
            kill -9 $(cat $pidfile 2> /dev/null) 2> /dev/null || break
 
64
            kill -9 $pid 2> /dev/null || break
64
65
            sleep $try
65
66
        done
66
67
    done