mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-28 04:48:16 +00:00
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
38 lines
554 B
Bash
38 lines
554 B
Bash
#!/bin/bash
|
|
|
|
source ../../../functions.sh || exit 1
|
|
source ../../../env.sh || exit 1
|
|
|
|
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
|
|
|
|
${criu} dump -D dump -o dump.log -v4 --shell-job -t ${pid} || {
|
|
echo "Dump failed"
|
|
exit 1
|
|
}
|
|
|
|
wait_tasks dump
|
|
|
|
echo "Dumped, restoring and waiting for completion"
|
|
|
|
${criu} restore -D dump -o restore.log -v4 --shell-job || {
|
|
echo "Restore failed"
|
|
exit 1
|
|
}
|
|
|
|
echo PASS
|