- Timestamp:
- 2017-05-31T18:05:11+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/util/SafeProcess.java
r31716 r31718 162 162 * This method returns a boolean that you can call sentInterrupt. 163 163 */ 164 public boolean cancelRunningProcess() { 164 public boolean cancelRunningProcess() { 165 165 166 166 boolean forceWaitUntilInterruptible = true; … … 921 921 */ 922 922 923 if(pid == -1) { 923 if(pid == -1) { // if the process has already terminated, or we can't get the pid for any reason: 924 924 p.destroy(); // at minimum. Will have no effect if the process had already terminated 925 925 } else { … … 929 929 if(!killUnixProcessWithID(pid, !forceKill, killEntireProcessTree)) { // send sig TERM (kill -15 or kill -TERM) 930 930 killUnixProcessWithID(pid, forceKill, killEntireProcessTree); // send sig KILL (kill -9 or kill -KILL) 931 } 931 } 932 // if both kill commands failed for whatever reason, can still at least end the top level process: 933 p.destroy(); // no effect if the process has already terminated. 932 934 } 933 935
Note:
See TracChangeset
for help on using the changeset viewer.