Changeset 31704
- Timestamp:
- 2017-05-25T19:01:33+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/util/SafeProcess.java
r31703 r31704 832 832 } 833 833 834 // On linux and mac, p.destroy() suffices to kill processes launched by p as well. 835 // On Windows we need to do more work, since otherwise processes launched by p remain around executing until they naturally terminate. 834 // On linux, the SafeProcess code handling an Interruption suffices to successfully and cleanly terminate 835 // the process and any subprocesses launched by p as well (and not even an extra p.destroy() is needed). 836 // On Windows, and Mac too, we need to do more work, since otherwise processes launched by p remain 837 // around executing until they naturally terminate. 836 838 // e.g. full-import.pl may be terminated with p.destroy(), but it launches import.pl which is left running until it naturally terminates. 837 839 private static void destroyProcess(Process p, boolean canSkipExtraWorkIfLinux) { … … 893 895 894 896 return; 895 } 896 897 // else we're on windows: 898 899 897 } 900 898 } 901 899 … … 969 967 p.destroy(); 970 968 } else { // terminate windows way 971 SafeProcess.killWinProcessWithID(parent_pid); // get rid of process with current pid 969 SafeProcess.killWinProcessWithID(parent_pid); // get rid of process with current pid 972 970 } 973 971
Note:
See TracChangeset
for help on using the changeset viewer.