aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2003-10-25 02:58:03 +0000
committerGlen Mazza <gmazza@apache.org>2003-10-25 02:58:03 +0000
commite1c96a10fe9674951a2184a6789fd61225bcecbd (patch)
tree11888522652a5501218c6d102a1746f3c42c480c /src/java/org
parentd5b316d544b3e0bb817c3a2f08ce2f30cc933985 (diff)
downloadxmlgraphics-fop-e1c96a10fe9674951a2184a6789fd61225bcecbd.tar.gz
xmlgraphics-fop-e1c96a10fe9674951a2184a6789fd61225bcecbd.zip
Explicitly calling System.exit(0) for non-AWTRenderer outputs to close any threads
that may be active as a result of AWT (svg) or other processing. See: http://marc.theaimsgroup.com/?l=fop-dev&m=106703706423223&w=2 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196971 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/apps/Fop.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/apps/Fop.java b/src/java/org/apache/fop/apps/Fop.java
index 441ca0c51..37ebb1d8e 100644
--- a/src/java/org/apache/fop/apps/Fop.java
+++ b/src/java/org/apache/fop/apps/Fop.java
@@ -105,6 +105,13 @@ public class Fop {
bos.close();
}
}
+
+ // System.exit(0) called to close AWT/SVG-created threads, if any.
+ // AWTRenderer closes with window shutdown, so exit() should not
+ // be called here
+ if (options.getOutputMode() != CommandLineOptions.AWT_OUTPUT) {
+ System.exit(0);
+ }
} catch (FOPException e) {
if (e.getMessage() == null) {
System.err.println("Exception occured with a null error message");
@@ -116,6 +123,7 @@ public class Fop {
} else {
System.err.println("Turn on debugging for more information");
}
+ System.exit(1);
} catch (java.io.IOException e) {
System.err.println("" + e.getMessage());
if (options != null && options.getLogger().isDebugEnabled()) {
@@ -123,6 +131,7 @@ public class Fop {
} else {
System.err.println("Turn on debugging for more information");
}
+ System.exit(1);
}
}
}