Ignore:
Timestamp:
2014-10-10T16:59:53+13:00 (10 years ago)
Author:
ak19
Message:

Fix to recent commit that made GS3ServerThread.java do a Process.waitFor(). JRE6 is included in GS binaries. But Java 6 does not work with Process.WaitFor() in GS3ServerThread, as the GS3 server waits to start until after GLI has been quit. Java 7 (JDK and JRE 7) work fine with this. To get Java 6 to work, need to handle the IOstreams of the Process launched by GS3ServerThread. Using the StreamGobbler classes for this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r29356 r29361  
    744744                p = Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "ant stop -f \"" + Configuration.gsdl3_src_path + File.separator + "build.xml\""});
    745745            }
    746             if(p != null && p.waitFor() == 0) {
     746            // doing a p.waitFor() without processing the Process' IOstreams causes blocking with Java 6
     747            // (i.e. when JRE 6 included with GS binaries). However, p.waitFor() with Java 7 is fine.
     748            /*if(p != null && p.waitFor() == 0) {
    747749                DebugStream.println("********** SUCCESSFULLY stopped THE GS3 SERVER ON EXIT");
    748750            }
     
    750752                System.err.println("********** FAILED TO SUCCESSFULLY stop THE GS3 SERVER ON EXIT");
    751753                //throw new Exception ("Failed to successfully stop the GS3 server on exit.");
    752             }
     754            }*/
    753755            } catch(Exception e) {
    754756            System.err.println("Exception when trying to stop the tomcat web server: " + e);
Note: See TracChangeset for help on using the changeset viewer.