Skip to content

Commit

Permalink
Merge branch 'master' into actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nmacedo committed Jun 15, 2018
2 parents 7ac1e57 + 85b086c commit 68c7a1f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,11 @@ public static void stop() {
try {
Field f = latest_sub.getClass().getDeclaredField("pid");
f.setAccessible(true);
System.out.println("Process ID : " + f.get(latest_sub));
Runtime.getRuntime().exec("kill -SIGTERM "+f.get(latest_sub));

} catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

// latest_sub.destroy();
}} finally { latest_manager=null; latest_sub=null; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,9 @@ private static boolean isSat(String output) {
private static boolean loadLibrary(String library) {
boolean loaded = _loadLibrary(library);
String libName = System.mapLibraryName(library);
if (loaded) System.out.println("Loaded: " + libName);
else System.out.println("Failed to load: " + libName);
if ("yes".equals(System.getProperty("debug"))) // [HASLab]
if (loaded) System.out.println("Loaded: " + libName);
else System.out.println("Failed to load: " + libName);
return loaded;
}

Expand All @@ -238,20 +239,23 @@ private static boolean staticLibrary(String name) {
for(int i = dirs.length-1; i >= 0; i--) {
final File file = new File(dirs[i]+File.separator+name);
if (file.canExecute()) {
System.out.println("Loaded: " + name);
if ("yes".equals(System.getProperty("debug")))
System.out.println("Loaded: " + name);
return true;
}
}
// check if in system path
for (String str : (System.getenv("PATH")+":/usr/local/bin").split(Pattern.quote(File.pathSeparator))) {
Path pth = Paths.get(str);
if (Files.exists(pth.resolve(name))) {
System.out.println("Loaded: " + name);
if ("yes".equals(System.getProperty("debug")))
System.out.println("Loaded: " + name);
return true;
}
}

System.out.println("Failed to load: " + name);
if ("yes".equals(System.getProperty("debug")))
System.out.println("Failed to load: " + name);
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion pardinus

0 comments on commit 68c7a1f

Please sign in to comment.