Welcome to mirror list, hosted at ThFree Co, Russian Federation.

functions.sh « others « test - github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2ec66cbec840b74fe8edb8963db84411a9eaec60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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
}