Simplify analysis process termination a bit.
Merge pull request #24 from Dmitry-Me/simplifyanalysisprocesstermination

Simplify analysis process termination a bit.