2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00
criu/test/others/functions.sh
Andrew Vagin f6d9d8d41a tests: move app-emu in test/others/
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-29 11:35:26 +03:00

17 lines
306 B
Bash

# Wait while tasks are dying, otherwise PIDs would be busy.
function wait_tasks()
{
local dump=$1
local pid
for i in $dump/core-*.img; do
pid=`expr "$i" : '.*/core-\([0-9]*\).img'`
while :; do
kill -0 $pid > /dev/null 2>&1 || break;
echo Waiting the process $pid
sleep 0.1
done
done
}