bring back closeSigar() call in shutdown (commented out in cd42290
)
This commit is contained in:
parent
a5dacd4d03
commit
b3078dca91
|
@ -199,9 +199,18 @@ public class Shell extends ShellBase {
|
||||||
|
|
||||||
public void shutdown() {
|
public void shutdown() {
|
||||||
this.sigar.close();
|
this.sigar.close();
|
||||||
//avoid possible Class Not Found: junit/framework/TestCase
|
//cleanup for dmalloc
|
||||||
if (System.getProperty("jni.dmalloc") != null) {
|
//using reflection incase junit.jar is not present
|
||||||
//org.hyperic.sigar.test.SigarTestCase.closeSigar(); //shutup dmalloc
|
try {
|
||||||
|
//SigarTestCase.closeSigar();
|
||||||
|
Class.forName("org.hyperic.sigar.test.SigarTestCase").
|
||||||
|
getMethod("closeSigar", new Class[0]).invoke(null, new Object[0]);
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
//SigarTestCase.java not compiled w/o junit.jar
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (NoClassDefFoundError e) {
|
||||||
|
//avoiding possible Class Not Found: junit/framework/TestCase
|
||||||
}
|
}
|
||||||
super.shutdown();
|
super.shutdown();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue