gmazza      2003/10/24 19:58:03

  Modified:    src/java/org/apache/fop/apps Fop.java
  Log:
  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
  
  Revision  Changes    Path
  1.7       +9 -0      xml-fop/src/java/org/apache/fop/apps/Fop.java
  
  Index: Fop.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Fop.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Fop.java  15 Aug 2003 18:53:18 -0000      1.6
  +++ Fop.java  25 Oct 2003 02:58:03 -0000      1.7
  @@ -105,6 +105,13 @@
                       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 @@
               } 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 @@
               } else {
                   System.err.println("Turn on debugging for more information");
               }
  +            System.exit(1);
           }
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to