Changeset 9054
- Timestamp:
- 2005-02-16T11:35:39+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r9045 r9054 111 111 } 112 112 113 113 114 public Gatherer() 114 115 { … … 125 126 String wget_version_str, String wget_path) 126 127 { 127 // This will hopefully catch ctrl-c and terminate, and exit gracefully. However it is platform specific, and may not be supported by some JVMs.128 /** It does, but I get bloody sick of it working when the Gatherer hangs.129 CTRLCHandler handler = new CTRLCHandler();130 Signal.handle(new Signal("INT"), handler);131 Signal.handle(new Signal("TERM"), handler);132 handler = null;133 */134 128 if (gsdl3_path != null && !gsdl3_path.equals("")) { 135 129 this.GS3 = true; … … 137 131 gsdl3_path = null; 138 132 } 139 // Create the debug stream only if required. 133 134 // Create the debug stream if required 140 135 if (debug_enabled) { 141 136 DebugStream.enableDebugging(); … … 150 145 DebugStream.print(System.getProperties()); 151 146 } 147 152 148 try { 153 149 // Load Config … … 825 821 } 826 822 827 /** This class is intented to detect a specific SIGNAL, in this case SIGINT, and exit properly, rather than letting the Gatherer be interrupted which has the potential to leave erroneous lock files. */828 // private class CTRLCHandler829 // implements SignalHandler {830 // /** <i>true</i> if we ignore any other signals we receive, most likely because we are already dealing with one, <i>false</i> otherwise. */831 // private boolean ignore = false;832 // /** The method called by the system to inform us a signal has occured.833 // * @param sig The <strong>Signal</strong> itself.834 // * @see org.greenstone.gatherer.collection.CollectionManager835 // */836 // public void handle(Signal sig) {837 // if(!ignore) {838 // ignore = true;839 // // handle SIGINT840 // System.out.println("Caught Ctrl-C...");841 // if(c_man != null && c_man.ready()) {842 // c_man.closeCollection();843 // }844 // exit();845 // ignore = false;846 // }847 // }848 // }849 823 850 824 private class PerlTest {
Note:
See TracChangeset
for help on using the changeset viewer.