- Timestamp:
- 2017-05-08T21:18:21+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GDBMWrapper.java
r31230 r31665 29 29 import java.util.ArrayList; 30 30 31 import org.greenstone.util.SafeProcess; 32 31 33 /** 32 34 * java wrapper class for gdbm - uses Java-GDBM written by Martin Pool replaces … … 113 115 String cmdTest = "perl -v 2>&1"; 114 116 //String cmdTest = "echo %PATH%"; 115 int returnValue = Processing.runProcess(cmdTest); 117 118 //int returnValue = Processing.runProcess(cmdTest); 119 120 // replace Processing.java with SafeProcess.java 121 // so retain the same behaviour (logging) 122 SafeProcess process = new SafeProcess(cmdTest); 123 logger.error("executing command "+cmdTest); 124 int returnValue = process.runProcess(); 125 // do something with the messages 126 logger.error("err>"+process.getStdError()); 127 logger.error("out>"+process.getStdOutput()); 128 process = null; 129 116 130 if (returnValue != 0) 117 131 { … … 122 136 123 137 String cmd = "perl -S txtgz-to-gdbm.pl \"" + txtgzFilename + "\" \"" + filename + "\""; 124 returnValue = Processing.runProcess(cmd); 138 //returnValue = Processing.runProcess(cmd); 139 140 // replace Processing.java with SafeProcess.java 141 // so retain the same behaviour (logging) 142 process = new SafeProcess(cmd); 143 logger.error("executing command "+cmd); 144 returnValue = process.runProcess(); 145 // do something with the messages 146 logger.error("err>"+process.getStdError()); 147 logger.error("out>"+process.getStdOutput()); 148 process = null; 149 125 150 // For some reason, launching this command with gsdl_system() still returns 1 126 151 // even when it returns 0 when run from the command-line. We can check whether
Note:
See TracChangeset
for help on using the changeset viewer.