more gentle termination (like Bash.multi_kill without signal) to give prover a chance to conclude;
authorwenzelm
Sun Feb 14 14:33:32 2016 +0100 (2016-02-14)
changeset 62310ab836dc7410e
parent 62309 96c9a259d275
child 62311 73bebf642d3b
more gentle termination (like Bash.multi_kill without signal) to give prover a chance to conclude;
src/Pure/PIDE/prover.scala
     1.1 --- a/src/Pure/PIDE/prover.scala	Sun Feb 14 13:38:31 2016 +0100
     1.2 +++ b/src/Pure/PIDE/prover.scala	Sun Feb 14 14:33:32 2016 +0100
     1.3 @@ -183,9 +183,15 @@
     1.4  
     1.5    def terminate()
     1.6    {
     1.7 +    system_output("Terminating prover process")
     1.8      command_input_close()
     1.9 -    system_output("Terminating prover process")
    1.10 -    terminate_process()
    1.11 +
    1.12 +    var count = 10
    1.13 +    while (!process_result.is_finished && count > 0) {
    1.14 +      Thread.sleep(100)
    1.15 +      count -= 1
    1.16 +    }
    1.17 +    if (!process_result.is_finished) terminate_process()
    1.18    }
    1.19  
    1.20