Changeset 31704 for main/trunk/gli

Show
Ignore:
Timestamp:
25.05.2017 19:01:33 (2 years ago)
Author:
ak19
Message:

Cosmetic changes before bringing the GS3's src code version of SafeProcess? up to speed with GLI's version

Files:
1 modified

Legend:

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

    r31703 r31704  
    832832} 
    833833 
    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. 
    836838// e.g. full-import.pl may be terminated with p.destroy(), but it launches import.pl which is left running until it naturally terminates. 
    837839private static void destroyProcess(Process p, boolean canSkipExtraWorkIfLinux) { 
     
    893895     
    894896    return; 
    895     } 
    896      
    897     // else we're on windows: 
    898  
    899      
     897    }     
    900898} 
    901899 
     
    969967    p.destroy(); 
    970968    } 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 
    972970    } 
    973971