mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-19 09:35:12 +00:00
Otherwise some PID-s may be busy. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
38 lines
570 B
Bash
38 lines
570 B
Bash
#!/bin/bash
|
|
|
|
source ../../../functions.sh || exit 1
|
|
|
|
crtools="../../../../crtools"
|
|
|
|
cleanup_class() {
|
|
rm -f ./*.class
|
|
}
|
|
|
|
javac HelloWorld.java || exit 1
|
|
|
|
set -x
|
|
|
|
rm -rf dump
|
|
mkdir dump
|
|
|
|
setsid java HelloWorld &
|
|
|
|
pid=${!}
|
|
|
|
echo Lanuched java application with pid $pid in background
|
|
|
|
${crtools} dump -D dump -o dump.log -v 4 --shell-job -t ${pid} || {
|
|
echo "Dump failed"
|
|
exit 1
|
|
}
|
|
|
|
wait_tasks dump
|
|
|
|
echo "Dumped, restoring and waiting for completion"
|
|
|
|
${crtools} restore -D dump -o restore.log -v 4 --shell-job -t ${pid} || {
|
|
echo "Restore failed"
|
|
exit 1
|
|
}
|
|
|
|
echo PASS
|