Use signal handler for checkpointing #254
@ -30,9 +30,7 @@ import org.eclipse.openj9.criu.CRIUSupport;
|
||||
import org.eclipse.openj9.criu.JVMCRIUException;
|
||||
import sun.misc.Signal;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.*;
|
||||
import java.net.InetAddress;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.Files;
|
||||
@ -109,6 +107,11 @@ public class CheckpointUtils {
|
||||
criu.checkpointJVM();
|
||||
} catch (JVMCRIUException e) {
|
||||
Bukkit.shutdown();
|
||||
|
||||
Path logfile = path.resolve("criu.log");
|
||||
if(logfile.toFile().exists())
|
||||
throw new IllegalStateException("Could not create checkpoint, criu log:\n" + new String(Files.readAllBytes(logfile)), e);
|
||||
|
||||
throw e;
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren