fda_scan now returns an exit value other than 0 when aborted via CTRL+C
FDA-67
This commit is contained in:
@@ -23,15 +23,11 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>ch.psi</groupId>
|
||||
<artifactId>fda</artifactId>
|
||||
<version>1.1.35-SNAPSHOT</version>
|
||||
<version>1.1.36-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ch.psi</groupId>
|
||||
<artifactId>jcae</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.0.30</version>
|
||||
</dependency>
|
||||
<!-- Plotting library -->
|
||||
<dependency>
|
||||
|
||||
@@ -70,9 +70,12 @@ public class AcquisitionMain {
|
||||
// Get Logger
|
||||
private static Logger logger = Logger.getLogger(AcquisitionMain.class.getName());
|
||||
|
||||
private static boolean abortedViaSignal = false;
|
||||
|
||||
/**
|
||||
* Main Program
|
||||
* Returns -1 if wrong number of arguments are passed
|
||||
* Returns 3 if aborted via Ctrl+C
|
||||
*
|
||||
* @param args Arguments of the program
|
||||
*/
|
||||
@@ -385,6 +388,7 @@ public class AcquisitionMain {
|
||||
System.exit(2);
|
||||
}
|
||||
|
||||
abortedViaSignal = true;
|
||||
// Abort acquisition engine
|
||||
if(acquisition.isActive()){
|
||||
// Abort acquisition
|
||||
@@ -425,6 +429,9 @@ public class AcquisitionMain {
|
||||
}
|
||||
// GUI GUI GUI GUI GUI GUI GUI
|
||||
|
||||
if(abortedViaSignal){
|
||||
System.exit(3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user