mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
test: Remove pidfile after killing the process
Though unlikely keeping files in place may result in random process killed.
This commit is contained in:
parent
bb93a28bc1
commit
1b0775916b
@ -435,6 +435,7 @@ kill_sleep_kill_() {
|
|||||||
slow=$2
|
slow=$2
|
||||||
if test -s $pidfile ; then
|
if test -s $pidfile ; then
|
||||||
pid=$(< $pidfile)
|
pid=$(< $pidfile)
|
||||||
|
rm -f $pidfile
|
||||||
kill -TERM $pid 2>/dev/null || return 0
|
kill -TERM $pid 2>/dev/null || return 0
|
||||||
if test $slow -eq 0 ; then sleep .1 ; else sleep 1 ; fi
|
if test $slow -eq 0 ; then sleep .1 ; else sleep 1 ; fi
|
||||||
kill -KILL $pid 2>/dev/null || true
|
kill -KILL $pid 2>/dev/null || true
|
||||||
|
Loading…
Reference in New Issue
Block a user