Skip to content
Snippets Groups Projects
Commit d287ec5c authored by Janis Daniel Dähne's avatar Janis Daniel Dähne
Browse files

- the 100% cpu was from forever running user programs ... p.waitFor won't kill the process!!

parent f9132321
No related branches found
No related tags found
No related merge requests found
......@@ -133,13 +133,8 @@ public class Main {
static String DefaultCGroupName = "syndrom";
public static void main(String[] myArgs) throws IOException {
if (isDebug) {
System.out.println(Arrays.toString(myArgs));
}
......@@ -437,7 +432,6 @@ public class Main {
}
}
List<String> cmdToEx = transformCommandWithSpecialStrings(directoryFile, mainFile,
mainFileNameWithExtension, executeTestCmd, timeoutInMs, memoryLimitInKb, diskLimitInKb,
sourceFileExtensionsWithoutDot);
......@@ -452,7 +446,6 @@ public class Main {
cmdToEx.addAll(_arguments);
}
if (isDebug) {
System.out.println(Arrays.toString(cmdToEx.toArray()));
}
......@@ -695,6 +688,12 @@ public class Main {
futureResult = -100;
}
//p.waitFor will NOT TERMINATE the process in any way...
//... so finally kill the process (if it's not already finished)
//else an infinitely loop would run forever
p.destroy();
if (isDebug) {
timer.end();
System.out.println("time for running process in ms :" + timer.getTotalTimeInMs());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment