diff options
author | Marian Csontos <mcsontos@redhat.com> | 2016-03-23 12:18:08 +0100 |
---|---|---|
committer | Marian Csontos <mcsontos@redhat.com> | 2016-03-23 12:25:18 +0100 |
commit | 1b0775916b78e1270872d3649a2c9abf0a1bb790 (patch) | |
tree | 34183c0f5a44b5601322a5e01062b4457bb3f43b /test | |
parent | bb93a28bc1d8b284c13ca5e5c925ce5b67d12204 (diff) | |
download | lvm2-1b0775916b78e1270872d3649a2c9abf0a1bb790.tar.gz |
test: Remove pidfile after killing the process
Though unlikely keeping files in place may result in random process
killed.
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/aux.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/lib/aux.sh b/test/lib/aux.sh index 4f5daaf56..276788054 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -435,6 +435,7 @@ kill_sleep_kill_() { slow=$2 if test -s $pidfile ; then pid=$(< $pidfile) + rm -f $pidfile kill -TERM $pid 2>/dev/null || return 0 if test $slow -eq 0 ; then sleep .1 ; else sleep 1 ; fi kill -KILL $pid 2>/dev/null || true |